HP RPG/XL Programmer's Guide (30318-90001)

8-: 17
to BATCHOUT. This number is tested against the file limit in JCWLIM. If
there is no more room to write records, the program ends.
Figure 8-13. Reading a User-Defined JCW - Program UPDATE
Comments
1 This line reads the User-Defined JCW, JCWEOF.
Columns 9-11 contain N99 to perform this Calculation operation
when indicator 99 is turned off (at the start of the program).
Columns 28-32 contain FNDJW to read a User-Defined JCW (this
operation uses the FINDJCW intrinsic).
Columns 33-42 contain the name of the User-Defined JCW, JCWEOF.
Columns 43-48 contain the name of the field, EOF, where the
JCWEOF information is stored.
2 This line reads the User-Defined JCW, JCWLIM.
Columns 9-11 contain N99 to perform this Calculation operation
when indicator 99 is turned off (at the beginning of the
program).
Columns 28-32 contain FNDJW to read a User-Defined JCW (this
operation uses the FINDJCW intrinsic).
Columns 33-42 contain the name of the User-Defined JCW, JCWLIM.
Columns 43-48 contain the name of the field, LIMIT, where the
JCWLIM information is stored.
3 Before writing a record, this line increments the output record
count in EOF.
4 This line compares the number of records in the BATCHOUT file
with the maximum number of records it holds. The maximum is
stored in LIMIT. Indicator 20 is turned on when EOF reaches
LIMIT.
5 This line executes a subroutine that displays a warning message.
6 This line turns on the last record (LR) indicator when the
maximum record limit is reached (indicator 20 is turned on).