C Z-ADD31 LENSTR
Cᑍ
C EXSR EXCCMD
Cᑍ
Cᑍ Delete the library
Cᑍ
C MOVELDLTLIB CMDSTR
C Z-ADD2 LENSTR
Cᑍ
C EXSR EXCCMD
Cᑍ
C SETON LR
C RETRN
Cᑍ
Cᑍ End of MAINLINE
Cᑍ
Cᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Cᑍ
C EXCCMD BEGSR
Cᑍ
Cᑍ Process requested CL command
Cᑍ
C CALL 'QCAPCMD'
C PARM CMDSTR
C PARM LENSTR
C PARM QCABC
C PARM SIZE
C PARM 'CPOP1'FORMAT 8
C PARM RCVVAR 1
C PARM RCVSIZ
C PARM RCVSIZ
C PARM QUSBN
Cᑍ
Cᑍ If an exception occurs, the API returns the exception in the
Cᑍ error code parameter. The bytes available field is set to
Cᑍ zero if no exception occurs and greater than zero if an
Cᑍ exception does occur.
Cᑍ
C QUSBNC IFGT
C MOVEL'QCAPCMD' APINAM
C EXSR ERRCOD
C ENDIF
C ENDSR
Cᑍ
Cᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Cᑍ
C ERRCOD BEGSR
Cᑍ
Cᑍ Process errors returned from the API.
Cᑍ
Cᑍ If first error found, then open QPRINT ᑍPRTF
Cᑍ
C FSTERR IFEQ ''
C OPEN QPRINT
C MOVEL'1' FSTERR
C ENDIF
Cᑍ
Cᑍ Print the error and the API that received the error
Appendix B. Original Examples in Additional Languages B-171