Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
I have 25 records in PF. I want to READ records from 10 to 20 only. How is it possible in RPG? Kindly help me
Do not define the file as keyed, then use relative record processing.
Do what Neil said, and then CHAIN to record 10 and continue reading until you hit record 20.
Of course this only works if the records on file are actually RRN 1-25.
If you just have 25 records on the file but cannot guarentee that there are no deleted records. Then you have to read each record and determine when you reach 10 and then keep going until you get to 20.