Home > Ask the AS/400 Experts > iSeries Application Development Questions & Answers > What happening to my subfile?
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

What happening to my subfile?

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 13 September 2006
I am writing a program using subfiles. My subfile is doing something strange. When I call the program it displays on the last page of records in the subfile. I need it to display from the first record it finds down. I assume this can be corrected easily, but I can't find the answer.

>
EXPERT RESPONSE
When you load a subfile, the field you specified as the subfile record number field...

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


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
iSeries Application Development
Monitoring escape messages and using RCVMSG for diagnostic messages
Listing contents of multiple FTP directories on AS/400
Chain operation error after converting RPG3 to ILE RPG (RPGIV)
Space offset X'0015FF00' or X'0000000000000000' is outside current limit for object QIGC2424C
Searching fields for values
Searching part of a name or address in AS/400
iSeries application display subfiles with other program windows
Passing parameters in an ILE RPG module
What's happening to my subfile?
Passing parameters in an ILE RPG module

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts