WHY SUBFILES IN AS400
1. Explain Subfile.
To
access multiple records at a time, we can use subfiles. It makes easy the user
task that he can work with group of record. It has two record formats.
1.
Subfile Record
2.
Subfile Control Record
2. What is a Subfile control record?
The record that
controls the display of the record format and text information
3. What is a Subfile record
format?
The record that
contains the displayable data.
4. What must follow the SFLCTL
keyword in the Subfile control record?
The name of the
Subfile Record Format.
5. What are the mandatory keywords for declare Subfile.
SFL, SFLCTL,
SFLDSP, SFLSIZ and SFLPAG
SFL
It
defines the record is Subfile record.
SFLCTL
It
defines the record is a control record.
SFLDSP
It
is to display the data is the display screen.
SFLSIZ
It
identifies the Subfile size. The max size for Load all is 9999.
SFLPAG
It
identifies the no. of record to be displayed at a time. For load all it should
be less than SFLSIZ
6. What is Relative Record Number [RRN]?
Relative Record Number [RRN] is a
unique numeral value used to position records in Subfile.
7. What DDS keywords are
required when defining a control record format?
SFLCTL,
SFLDSPCTL, SFLPAG, SFLSIZ.
8. What are the 3 types of
subfiles?
Single page, expandable and load-all.
9. Which type of Subfile has the
better performance?
Single page.
10. What is a Subfile record
number?
The internal
value associated with the each Subfile record.
11. What does ‘O.S 400 controlling of Subfile’ mean?
In
Load All Subfile if we press the Page Up or Page Down key the control will not
go to the program and the O.S.400 will take the control and redisplay the
preceding or succeeding records.
This
simplifies the coding and if the beginning or end of Subfile reached then the O.S
400 will automatically display the message like ‘End Of File Reached’.
12. Why would one take control over rolling of Subfile record?
It will reduce the time taken to
redisplay the records if there is large records. If we define the roll key then
the control will return to program while the roll key is pressed. The program
then adds new records and display.
13. How will you get a Plus sign in Subfile?
By
specifying the SFLEND keyword. If we specify *More with SFLEND then the word
MORE will be at lower right corner which indicates more records are there in
Subfile than displaying and if end of file reached then it will display
‘BOTTOM’.
14. How does CLRL work? Compare it with OVERLAY.
This
keyword is used to Clear and Control specific number of lines from the screen.
It also helps to overlap two record formats without the first format is being
cleared completely. Only those lines cleared from the first format are deleted,
all other lines will remain in the screen.
If
we specify CLRL (*NO) for a format then no line will be cleared. So if a record
format is overlayed then the lines of the previous format will not be deleted
but just overlayed.
It
is not in case of OVERLAY. If any line in the first format in the overlaps then
the complete format will be deleted before next format display.
15. What do you mean by SFLRCDNBR?
It
means Subfile record number. This is used in load all type.
Suppose
we are living in third page and if we press Enter key, then the control will go
to first page. So if we move the position of 378 to 379 of the File Information
Data Structure to a hidden field then the RRN value and Subfile Record Number
will be same. So the control will be in the living page.
We
cannot use SFLRCDNBR and SFLROLVAL simultaneously.
16. What does the SFLNXTCHG
keyword mean?
It
means Subfile Next Change. It activates the READC operation and mark records as
changed records.
Suppose
the READC operation reads fifth or sixth changed record and if modify a second
or first record then READC wont read that record. For this we activate the
SFLNXTCHG keyword with an indicator. So if we change a record that indicator
will seton and READC will read all changed record.
No comments