What's happening to my subfile?
Search400.com development expert John Blenkinsop helps an iSeries user out with a subfile problem.
A D1DRRN 4S 0H SFLRCDNBR
...is incremented as each record is loaded. This field needs to be set back to 1 once the subfile has been built, because the page that contains the record whose record number is in that field is the page that will be displayed first -- that's why you see the last page in the subfile.
This is a useful feature. When you read the subfile, you can set the SFLRCDNBR field to the RRN of the first record in error (for example), or to the RRN of the record at the top of the page the user was displaying when control returned to your program, which allows you to show the same page to the user when you return control back to the screen.
There are plenty of tutorials on subfiles. These are some I recommend:
Back to Basics: Introduction to Subfiles
Back to Basics: Self-Extending Subfiles
Become the Master of Your Subfile Domain
Dig Deeper on Debugging
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our AS/400 experts
View all AS/400 questions and answers
Start the conversation
0 comments