How I can reread the physical file in CL program once the
end of file reached in same CL program.

Answer Posted / naga srinivas

WE can't read the file again once you reached end of file.
If you want to use the POSDBF command before reaching the
end of file you make to position to starting.Use RTVMBRD, we
get the number of records in the file.Count the number of
records retrieved.When the count becomes equal to number of
records in PF..use POSDBF and make the cursor position to
intial record

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can I touch the array during treatments?

954


what is a rpg?

923


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

703


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

730


what are the key words you must use when using a subfile?

900


How can we know running job is batch or interactive?

877


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

738


how do I declare a minor?

911


how do I preserve and clean the array?

862


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.

989


How to declare the pull button in AS/400..

2120


what do you mean by an input subfile, what are the keywords required?

1036


what is program status data structure?

1819


What is the purpose of record level identifier?

907


How can we override a file during runtime in rpg?

932