0 pts.
 One subfile has more records than the other.
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

Answer Wiki:
For the cursor location you will need to have the RRN of the related record. You could hold the RRN of the first distribution record for each invoice record in a hidden field and hold the RRN of the related invoice record on each distribution record similarly.
Last Wiki Answer Submitted:  May 27, 2005  4:25 am  by  Scubablue   0 pts.
All Answer Wiki Contributors:  Scubablue   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 .

 0 pts.

 

Thanks. I will try your suggestions.

 0 pts.