From: Brian Singleton To: All
I'm having trouble with subfiles. I have set subfile size one greater than subfile page and load the subfile. The problem occurs if I press Roll Up several times and then press Roll Down to the top (which is handled by OS/400), then press Enter. OS/400 jumps back to the last record in the subfile. I would rather have the subfile not roll when I press the Enter key. Is this possible? I have tried experimenting with the RRN, but have had no success.
From: James Coolbaugh To: Brian Singleton
Yes, you can control which page is displayed at any given time. In the information data structure for a display file there are three values available to give you information about the subfile that is currently being displayed. These are as follows:
IINFDS DS I B 376 3770SFLRR# I B 378 3790SFLPG# I B 380 3810SFLREC
The one you are interested in is SFLPG#. This value will give you the relative record number of the first subfile record currently being displayed. In other words, the current page you are on. The information data structure is updated by OS/400 when the subfile page changes. So all you need to do is take this value and load it into the variable you have specified on the SFLRCDNBR keyword on your subfile. This will then position you to the page that contains that record.
LATEST COMMENTS
MC Press Online