How I can reread the physical file in CL program once the
end of file reached in same CL program.
Answer Posted / sekhar
Answer 11 is correct when the version of your iSeries is V6 and above. For V5R* , I guess CLOSE key word is not there.
For V5R4 systems... you can approach below solution.
Declare the same file two times with different OPENIDs
Before first RCVF , do OPNDBF and read the file. After reaching EOF do CLOF
Then do OPNDBF for second OPNID and do the same again.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
what is a rpg?
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.
what are the key words you must use when using a subfile?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
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...
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.
How to select highest score of each subject or how to select highest income of every month?
how do you use commitment control in rpg?
what is kids-rpg?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
how do I preserve and clean the array?
what is *place and *auto keyword in prtf ?plz explain
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.
Explain mdt?