How I can reread the physical file in CL program once the
end of file reached in same CL program.
Answer Posted / jim
Specify two DCLF for the same file with 2 different
openID's sayID1 and ID2
Tjen do RCVF on the file with open ID ID1 do the
processing, upon EOF then issue a 2nd RCVF for open ID2
the 1st record will be available.
Here's an example
DCLF FILE(FILE1) OPNID(ID1)
DCLF FILE(FILE2) OPNID(ID2)
RCVF: RCVF RCDFMT(FILE1) OPNID(ID1)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(XYZ))
GOTO RCVF
XYZ:
RCVF RCDFMT(FILE2) OPNID(ID2)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
GOTO XYZ
END:
ENDPGM
| Is This Answer Correct ? | 26 Yes | 9 No |
Post New Answer View All Answers
which program rpg or cl is efficent to update a transaction onto a database file and why ?
What are the types of identifiers?
How would display prime numbers using CL program?
are there any useful c runtime apis that I can call from rpg iv?
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
do you use message subfiles? What are the necessary keywords required coding a message subfile?
what was the robotech rpg?
how do I preserve and clean the array?
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
How many program bind in one module....
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
How to handle duplicate error handling in RPG?
How to select highest score of each subject or how to select highest income of every month?
what is file information data structure?
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.