C ENDSR
C\
C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
C\
C\ Subroutine: ERROR
C\
C\ Descriptive Name: Process API errors.
C\
C\ Description: This subroutine will print a line to a spooled
C\ file if any errors are returned in the error code
C\ parameter.
C\
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
C\
C\ Output the error and the API that received the error
C\
C EXCEPT BAD_NEWS
C\
C ENDSR
OQPRINT E BAD_NEWS 1
O 'Failed in API '
O API_NAME
O 'with error '
O QUSEI
\\CTDATA OBJ_INFO
ABCPGMMRM1\PGM ðððð5ðð1ðABCABCV3R1Mð
ABCPGMMRM2\PGM ðððð5ðð1ðABCABCV3R1Mð
ABCPGMMRI1\PGM ðððð2924ðABCABCV3R1Mð
ABCPGMMRI2\PGM ðððð2924ðABCABCV3R1Mð
ABCPGM \PGM ðððð5ðð1ðABCABCV3R1Mð
QCLSRC \FILE ðððð2924ðABCABCV3R1Mð
ABCDSPF \FILE ðððð2924ðABCABCV3R1Mð
ABCPF \FILE ðððð2924ðABCABCV3R1Mð
ABCMSG \MSGF ðððð2924ðABCABCV3R1Mð
ABC \CMD ðððð2924ðABCABCV3R1Mð
ABCPNLGRP \PNLGRP ðððð2924ðABCABCV3R1Mð
ABCðð5ð \PRDDFN ðððð5ðð1ðABCABCV3R1Mð
ABCðð5ð \PRDLOD ðððð5ðð1ðABCABCV3R1Mð
ABCðð29 \PRDLOD ðððð2924ðABCABCV3R1Mð
ABC \LIB ðððð5ðð1ðABCABCV3R1Mð
Appendix B. Original Examples in Additional Languages B-151