ᑍ Input parameters.
ᑍ
1 USR-PRF PIC X(1).
1 OBJ-TYPE PIC X(1).
ᑍ
ᑍ String to map User Space offsets into
ᑍ
1 STRING-SPACE PIC X(32).
ᑍ
ᑍ User Space Generic Header include. These includes will be
ᑍ mapped over a User Space.
ᑍ
COPY QUSGEN OF QSYSINC-QLBLSRC.
ᑍ
ᑍ List Objects that Adopt API include. These includes will be
ᑍ mapped over a User Space.
ᑍ
COPY QSYLOBJP OF QSYSINC-QLBLSRC.
ᑍ
ᑍ Beginning of mainline
ᑍ
PROCEDURE DIVISION USING USR-PRF, OBJ-TYPE.
MAIN-LINE.
PERFORM INIT.
PERFORM PROCES.
PERFORM DONE.
ᑍ
ᑍ Start of subroutines
ᑍ
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
PROCES.
ᑍ
ᑍ Do until the list is complete
ᑍ
MOVE INFORMATION-STATUS OF QUS-GENERIC-HEADER-1 TO
LST-STATUS.
ᑍ
PERFORM PROCES1 WITH TEST AFTER UNTIL LST-STATUS = "C".
ᑍ
PROCES1.
ᑍ
ᑍ This subroutine processes each entry returned by QSYLOBJP
ᑍ
ᑍ
ᑍ If valid information was returned
ᑍ
IF (INFORMATION-STATUS OF QUS-GENERIC-HEADER-1 = "C"
OR INFORMATION-STATUS OF QUS-GENERIC-HEADER-1 = "P")
IF NUMBER-LIST-ENTRIES OF QUS-GENERIC-HEADER-1 >
ᑍ
ᑍ increment to the first list entry
ᑍ
SET ADDRESS OF QSY-OBJP2-LIST TO
ADDRESS OF STRING-SPACE(
(OFFSET-LIST-DATA OF QUS-GENERIC-HEADER-1 + 1):1), 5
SET ADDRESS OF STRING-SPACE TO ADDRESS OF
QSY-OBJP2-LIST,
ᑍ
Appendix B. Original Examples in Additional Languages B-103