The user program lists only the first 10 input records of a member.
If a member consists of less than 10 records, the program pads it out with additional records of its own to bring it up to 10.
|
(1) | LMS is called. |
(2) | All messages and statements are logged. |
(3) | Library USE.LIB is assigned. |
(4) | User source program USELST is listed. |
PARDSECL EQU *-PARDSEC L'DSECT
USELST CSECT PAGE
STM 0,15,0(13) SAVE REGISTERS
LR 10,15 BASE
USING PARDSEC,1 LMS PARAMETERLIST
USING USELST,10
L 6,AUFTRAG A(TASK)
L 7,ANTWORT A(ANSWER)
L 8,SATZ A(RECORD)
CLC 0(3,6),REC RECORD ORDERED?
BE DOSATZ YES ---?
CLC 0(3,6),BOE START OF ELEMENT
BE DOBOE YES ---?
CLC 0(3,6),EOE END OF ELEMENT
BE DOEOE YES ---?
B RETURN
*
DOBOE EQU *
ZAP ANZAHL,P0 COUNTER := 0
B RETURN
*
DOSATZ EQU *
CP ANZAHL,P10 ALREADY 10 RECORDS LISTED?
BNL DODEL YES (REST IGNORE) ---?
AP ANZAHL,P1 COUNTER := COUNTER +1
B DOCON
*
DOEOE EQU *
CP ANZAHL,P10 ALREADY 10 RECORDS LISTED?
BNL DOCON YES (NO INSERT) ---?
AP ANZAHL,P1 COUNTER := COUNTER +1
B DOINS
*
DOINS EQU *
MVC 0(3,7),INS INSERT RECORD
LA 9,INSSATZ
ST 9,SATZ A(RECORD TO BE INSERTED)
B RETURN
*
DODEL EQU *
MVC 0(3,7),DEL DELETE RECORD
B RETURN
*
DOCON EQU *
MVC 0(3,7),CON CONTINUE
*
|
(5) | Before listing an input record LMS branches to user program USELST, which resides in library USE.LIB. |
(6) | The first 10 records of member EINAUS of the assigned library USE.LIB are listed. |
|
(7) | The active user exits are displayed. |
(8) | Member PERSDAT is listed. Since it is shorter than 10 records it is padded with records by the user program. |
(9) | LMS is terminated. |