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


Please Help Members By Posting Answers For Below Questions

How to handle duplicate error handling in RPG?

1670


what is kids-rpg?

661


How to write record if no field or the field are different in physical file in rpgle ?

480


How can we know running job is batch or interactive?

646


What is the difference between iter and do?

666






what is the use of sflnxtchg?

797


what is an online rpg?

721


what is file information data structure?

1357


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.

2045


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1011


What is a record lock error?

1259


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.

5390


how do I declare a table or array in rpg iv?

729


how do I preserve and clean the array?

667


can you debug ile rpg program using isdb?

732