Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read, update and write to the same file 1

Status
Not open for further replies.

rstitzel

MIS
Apr 24, 2002
286
US
I have a file named WMPROD set up as an Update full procedural externally defined file. In my program I chain to the file. Record found UPDATE file. Record NOT found create a new record (WRITE).

I can only WRITE to an OUTPUT file. But I can't READ from an OUTPUT file. How could I get around this? I need to be able to read, update and write to the same file. In the old RPG II program the programmer used a "dummy" file name as an OUTPUT file and used a label command in his ocl to "point" it to the correct file.

How can I accomplish this in RPG IV?

Please advise.

Thanks in advance for any and all help.
 
columm 66 on the file specs set to "A", for add????
 
I'm pretty new to RPG so haven't come across this issue. Thanks for your tip!! I feel kinda stupid...but I know it's just ignorance.

Have a star.

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top