IBM Version 4 Universal Remote User Manual


 
MOVE "OBJP2" 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 CPF981, then User Space was not found
IF EXCEPTION-ID OF QUS-EC = "CPF981"
ᑍ 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