If you are working on learning RPG - I would stick with that for now. However, if the file is being created in QTEMP, you should be able to have another command create the LF you need. Then use an OVRDBF command to point the program at the correct LF. I would avoid OPNQRYF - Embedded SQL is more flexible. But learn the RPG/CL basics first. If you need more specific coding examples, I can help you out. Just post some more detailed info on your app. Take care, Kevin
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
create sort over PF in Qtemp
Collapse
X
-
create sort over PF in Qtemp
Here is a sample - make sure you set the member type of the program to SQLRPGLE. The program sorts all of teh records in the CUST file into order by state and city. Then loops through the result set reading each record (FETCH) one at a time. It displays the customer name on teh screen. It should provide a good framework. Good luck, Kevin
Code
Comment
-
create sort over PF in Qtemp
I am fairly new at RPG programming and have some confusion about accessing files in QTEMP. I have looked throughout the forum for information but have not found anything that could help me. My problem is: I have created work files in QTEMP that other RPG programs use to read from. How do I read these files from QTEMP in a specified view? Do I use a LF and OVRDBF? Should I use OPNQRYF to sort the PF before reading? Should I use SQL(which I have not used yet but would like to if this would be the better solution)? What would be the best way to handle this? Thank you, Sherri
Comment
Comment