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

can I touch the array during treatments?

1150


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

1120


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

1152


what is data area and how it is used in rpg program ?

1305


what is *place and *auto keyword in prtf ?plz explain

3142


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

1164


what is the necessary keyword needed to scroll subfile records?

1136


When it is desirable to describe files Internally?

1690


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

999


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

1902


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

1141


How can we override a file during runtime in rpg?

1183


How to call one program from another program in RPG? please help me with the code

1704


What is difference between bind by copy and bind by reference?

2449


what is kids-rpg?

1106