Twenty years ago these are the kind of things you had to know to work on the old AS400 systems. I found these on an old dusty corner of my homeserver. Enjoy the trip down memory lane or to use old RPG lingo AS400NERD CABEQ ‘1’ START
SUBFILES
What is a subfile ?
Subfile is a group of records of same record format and can be read from or write to the display in a single operation.
What are the contents of subfile ?
Subfile Record Format, Subfile Control Record Format, Relative Record Number, Subfile Record Number, Associated Subfile Keywords.
What are the two record formats that a subfile contains ?
Subfile record format(SFL), and subfile control record format(SFLCTL).
What is SFLPAG and SFLSIZ ?
SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen.
SFLSIZ : it is an attribute which specifies the number of records can be stored in the subfile.
What is the maximum number of subfiles that can specified in a display file ?
512
The maximum number of subfiles that can defined in a RPG program for one display file is ___ .
24
The maximum number of subfiles that can be active for a single file is____ .
12
What are the different opcodes used for file operation on a subfile in a RPG Program ?
READ, READC, CHAIN,UPDAT and WRITE
Can more than one subfile record be displayed on one line ?
Yes, by using SFLLIN keyword.
How do you specify the number of records to roll in a subfile ?
Use SFLROLVAL keyword in DDS along with the number, which specifies the number of records to scroll at a time.
How will you display a particular page in subfile ?
Move a valid relative record number(RRN) in the field specified using SFLRCDNBR keyword in DDS.
How to pick up the changed records every time in a subfile after the first change made ?
Seton SFLNXTCHG keyword indicator and update the subfile record.
What is the use of the SFLEND keyword ?
By specifying this keyword, the Bottom/More message could be displayed at end of screen.
How do you toggle between single line and multi-line display of a particular record in a subfile ?
Using SFLDROP keyword.
Explain the difference between defining Subfile and Message-subfile ?
A subfile record is defined by SFL keyword, whereas a message subfile is defined by SFLMSG keyword.
Can a single screen format occupy a screen area above and below a subfile format ?
Not possible.
How can a program be prevented from failing over when READC is performed on an empty subfile ?
Check indicator placed in position LO, which will be seton if EOF if reached.