You must:
Uncheck the "Dynamic pagination" box for view *1 or enter 1 in the type of pagination (in Adelia/400).
Not specify a guide file for the loading.
Create a view 01 (for example), with *1 as file origin.
-
The view mode is set to update with creation of records.
Access is by key, with WRAN01 as key.
The guide word for this view could be LINE_SF1.
If necessary, create a view to work with the file to be displayed (update, etc.).
Define a new variable in the prototype:
field = WRAN01 GW = WRAN01 Ln = 4 Dec = 0 Ref = *NODEF
Enter the following in the INITIALIZATION section:
********************** |
|
INITIALIZATION aa |
|
********************** |
|
CLEAR 1 |
|
*IN08='0' |
|
read the first record in the file |
|
DO_WHILE check outcome of read operation |
|
screen fields = file fields |
|
*DEL01 = *DEL01 + 1 |
|
WRAN01 = *DEL01 |
|
CREATE LINE_SF1 |
|
read next record |
|
REDO |
|
*IN07 = '1' |
|
WRAN01= 1 |
The fact that the subfile is managed in static mode, means:
you cannot write the instructions for dynamic pagination in the TRANSACTION section.
(pagination is controlled by the system.)
IF *ROLLUP
ROLL_UP
END
Reserved words used
WRAN01
is the variable generated by Adelia to work with the SFLRCDNBR keyword (number of the subfile control format).
*DEL01
is the Adelia reserved word that contains the total number of records loaded in the subfile.
*IN07
is the indicator associated with the use of the SFLEND keyword (continuation character) for subfile *1. This indicator is defined in the generation standards.
*IN08
is the indicator associated with the use of the SFLNXTCHG keyword. This indicator is set to '0' so that the created lines be active only if modified.
Click here for the detailed explanation of the reserved words.