MOVE 51 TO COMMAND-LENGTH.
CALL QCMDEXC USING COMMAND-STRING, COMMAND-LENGTH.
ᑍ
STOP RUN.
ᑍ
ᑍ End of Mainline
ᑍ
ᑍ
ᑍ Subroutine to handle errors returned in the error code
ᑍ parameter.
ᑍ
ERRCOD.
ᑍ
IF BYTES-AVAILABLE OF QUS-EC > 13
ᑍ
ᑍ Process errors returned from the API.
ᑍ
MOVE 65 TO COMMAND-LENGTH,
MOVE EXCEPTION-ID TO MSGIDD,
CALL QCMDEXC USING MESSAGE-TWO, COMMAND-LENGTH,
STOP RUN.
Retrieving the Hold Parameter (Error Code Structure)—ILE RPG
Example
Refer to “Retrieving the Hold Parameter (Error Code Structure)—OPM RPG
Example” on page 3-11 for the original example.
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Dᑍ
Dᑍ Program Name: JOBDAPI
Dᑍ
Dᑍ Programming Language: ILE RPG
Dᑍ
Dᑍ Description: This program retrieves the HOLD value from
Dᑍ a job description. It expects errors to be
Dᑍ returned via the error code parameter.
Dᑍ
Dᑍ Header Files Included: QUSEC - Error Code Parameter
Dᑍ QWDRJOBD - Retrieve Job Description API
Dᑍ
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Dᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Dᑍ
Dᑍ Error Code parameter include
Dᑍ
D/COPY QSYSINC/QRPGLESRC,QUSEC 14
Dᑍ
Dᑍ Retrieve Job Description API Include
Dᑍ
D/COPY QSYSINC/QRPGLESRC,QWDRJOBD
Dᑍ
Dᑍ Command string data structure
Dᑍ
DCMD_STRING DS
D 26 INZ('SNDMSG MSG(''HOLD value is ')
D HOLD 1
B-14 System API Programming V4R1