Cᑍ
C QUSBAVL IFGT
Cᑍ
Cᑍ If CPF981, then User Space was not found
Cᑍ
C QUSEI IFEQ 'CPF981'
Cᑍ
Cᑍ So create a User Space for the List generated by QSYLOBJP
Cᑍ
C CALL 'QUSCRTUS'
C PARM SPC_NAME
C PARM 'QSYLOBJP ' EXT_ATTR 1
C PARM SPC_SIZE
C PARM SPC_INIT
C PARM 'ᑍALL' SPC_AUT 1
C PARM ᑍBLANKS SPC_TEXT 5
C PARM 'ᑍYES' SPC_REPLAC 1
C PARM QUSEC
C PARM 'ᑍUSER' SPC_DOMAIN 1
Cᑍ
Cᑍ Check for errors on QUSCRTUS
Cᑍ
C QUSBAVL IFGT
C MOVEL 'QUSCRTUS' APINAM 1
C EXSR APIERR
C END
Cᑍ
Cᑍ Else, an error occurred accessing the User Space
Cᑍ
C ELSE
C MOVEL 'QUSROBJD' APINAM 1
C EXSR APIERR
C END
C END
Cᑍ
Cᑍ Set QSYLOBJP (via GETLST) to start a new list
Cᑍ
C MOVE ᑍBLANKS CONTIN_HDL
C EXSR GETLST
Cᑍ
Cᑍ Get a resolved pointer to the User Space for performance
Cᑍ
C CALL 'QUSPTRUS'
C PARM SPC_NAME
C PARM SPCPTR
C PARM QUSEC
Cᑍ
Cᑍ Check for errors on QUSPTRUS
Cᑍ
C QUSBAVL IFGT
C MOVEL 'QUSPTRUS' APINAM 1
C EXSR APIERR
C END
C ENDSR
Cᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
C APIERR BEGSR
Cᑍ
Cᑍ Log any error encountered, and exit the program
Appendix B. Original Examples in Additional Languages B-111