MOVE "OBJP2" TO MBR-LIST.
ᑍ
CALL "QSYLOBJP" USING SPC-NAME, MBR-LIST, USR-PRF,
OBJ-TYPE, CONTIN-HDL, QUS-EC. 3
ᑍ
ᑍ Check for errors on QSYLOBJP
ᑍ
IF BYTES-AVAILABLE OF QUS-EC >
MOVE "QSYLOBJP" TO APINAM,
PERFORM APIERR.
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
INIT.
ᑍ
ᑍ One time initialization code for this program
ᑍ
ᑍ Open LISTING file
ᑍ
OPEN OUTPUT LISTING.
ᑍ
ᑍ Set Error Code structure to not use exceptions
ᑍ
MOVE LENGTH OF QUS-EC TO BYTES-PROVIDED OF QUS-EC.
ᑍ
ᑍ Check to see if the User Space was previously created in
ᑍ QTEMP. If it was, simply reuse it.
ᑍ
CALL "QUSROBJD" USING RCVVAR, RCVVARSIZ, ROBJD-FMT,
SPC-NAME, SPC-TYPE, QUS-EC.
ᑍ
ᑍ Check for errors on QUSROBJD
ᑍ
IF BYTES-AVAILABLE OF QUS-EC >
ᑍ
ᑍ If CPF981, then User Space was not found
ᑍ
IF EXCEPTION-ID OF QUS-EC = "CPF981"
ᑍ
ᑍ So create a User Space for the List generated by QSYLOBJP
ᑍ
CALL "QUSCRTUS" USING SPC-NAME, EXT-ATTR, SPC-SIZE,
SPC-INIT, SPC-AUT, SPC-TEXT,
SPC-REPLAC, QUS-EC, SPC-DOMAIN
ᑍ
ᑍ Check for errors on QUSCRTUS
ᑍ
IF BYTES-AVAILABLE OF QUS-EC >
MOVE "QUSCRTUS" TO APINAM,
PERFORM APIERR,
ELSE
CONTINUE,
ELSE
ᑍ
ᑍ Else, an error occurred accessing the User Space
ᑍ
MOVE "QUSROBJD" TO APINAM,
PERFORM APIERR.
ᑍ
ᑍ Set QSYLOBJP (via GETLST) to start a new list
Appendix B. Original Examples in Additional Languages B-105