|
A subfile is a 'direct' file, and can be accessed by relative record number. The field you specified in your DDS as SFLRCDNBR and in your RPG F-spec in the SFILE keyword holds the RRN of the record currently available in your program.
So, set that field or one defined like it in a loop, incrementing the field and using it in factor 1 of a chain to the subfile record format. On error or end of file you leave the loop. You will read all the records in the subfile.
I have given links to useful material on subfiles in other replies in Ask The Experts, so please look at other subfile questions to see them. ==================================
MORE INFORMATION ON THIS TOPIC
==================================
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
|