1)how to do date validation in rpg?
2)how to delete dUPLICATE RECORDS?
Answer Posted / sekhar
1: FOR DATE VALIDATION
/FREE
TESTD(E) *ISO(WHAT EVER) DATE VARIABLE ;
IF %ERROR ;
DO SOME THING ;
ENDIF ;
/END-FREE
2: CREATE A LOGICAL ON THAT FILE WITH KEY SAY FILE1
IN RPG
FFILE1 IP E K DISK
D X S 9S 0
D
I RECORDFORMAT-FILE1
I KEYFIELD L1 (CONTROL INDICATOR)
/FREE
X += 1 ;
IF X <> 1 ;
DELETE RECORDFORMAT ;
ENDIF ;
/END-FREE
CL1 RESET X
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
explain sflclr, sflend, sfldlt, and sflcsrrrn?
How can we override a file during runtime in rpg?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
is this a rpg channel?
how does the rpg element work?
can you debug ile rpg program using isdb?
How to call one program from another program in RPG? please help me with the code
how do I declare a minor?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
what do you mean by an input subfile, what are the keywords required?
what is a rpg?
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
What is file identifier where we can use?