C\
C EVAL CMD_STR = DLTDQ
C EVAL LEN_STR = %SIZE(DLTDQ)
C\
C EXSR EXEC_CMD
C\
C\ Delete the library
C\
C EVAL CMD_STR = DLTLIB
C EVAL LEN_STR = %SIZE(DLTLIB)
C\
C EXSR EXEC_CMD
C\
C EVAL \INLR = '1'
C RETURN
C\
C\ End of MAINLINE
C\
C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
C\
C EXEC_CMD BEGSR
C\
C\ Process the requested CL command
C\
C CALL 'QCAPCMD'
C PARM CMD_STR
C PARM LEN_STR
C PARM QCAPð1ðð
C PARM CAPð1ðð_SZ
C PARM 'CPOPð1ðð' FORMAT 8
C PARM RCVVAR 1
C PARM ð RCVVAR_SZ
C PARM RCVVAR_SZ
C PARM QUSEC
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 IF QUSBAVL > ð
C EVAL API_NAME = 'QCAPCMD'
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 IF FIRST_ERR = 'ð'
C OPEN QPRINT
C EVAL FIRST_ERR = '1'
C ENDIF
B-174 System API Programming V4R1