TechTalk: Subfiles, Rolling and Enter

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

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.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: