Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

which program rpg or cl is efficent to update a transaction onto a database file and why ?

1191


What are the types of identifiers?

968


How would display prime numbers using CL program?

6245


are there any useful c runtime apis that I can call from rpg iv?

1111


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

1249


do you use message subfiles? What are the necessary keywords required coding a message subfile?

1074


what was the robotech rpg?

1129


how do I preserve and clean the array?

1080


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...

1817


How many program bind in one module....

2603


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1945


How to handle duplicate error handling in RPG?

2221


How to select highest score of each subject or how to select highest income of every month?

1708


what is file information data structure?

2112


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.

2458