Using "Subfiles in RPG IV" by Kevin Vandever, I am trying to enhance my programming skills. I have a program that uses multiple subfiles (side-by-side), and the second subfile has more records than the first. The first subfile shows the invoice information and the second subfile shows the distribution. There can be more than one distribution record to an invoice record. How can I control the cursor position to display the related data when toggling back and forth?
Software/Hardware used:
ASKED:
May 26, 2005 3:41 PM
UPDATED:
May 27, 2005 9:00 AM
not sure how your building your subfile but if your reading the invoice file and writing the first subfile before you go to the distributions store the RRN of the invoice line you’ve just written to the first subfile and write it out as a hidden field to the second to link the RRNs of the subfiles . Using the cursor RRN of subfile 2 chain to retrieve the subfile record and then use the hidden RRN of subfile 1 to re position on return .
Thanks. I will try your suggestions.