MOVE JOBD TO JOB-DESC.
MOVE JOBDL TO JOB-DESC-LIB.
\
\ Error Code Parameter is set to ð.
\
MOVE ð TO BYTES-PROVIDED. .6/
\
\ Receiver Length Set to 39ð.
\
MOVE 39ð TO RECEIVER-LENGTH. .3/
\
\ Call the QWDRJOBD API.
\
CALL QWDRJOBD USING QWD-JOBDð1ðð, RECEIVER-LENGTH,
FORMAT-NAME, JOBD-AND-LIB-NAME, QUS-EC.
\
\ Move HOLD-JOB-QUEUE to HOLD so that we can display the value using
\ the command string.
\
MOVE HOLD-JOB-QUEUE TO HOLD.
\
\ Let's tell everyone what the hold value was for this job.
\
MOVE 51 TO COMMAND-LENGTH.
CALL QCMDEXC USING COMMAND-STRING, COMMAND-LENGTH.
\
STOP RUN.
Retrieving the Hold Parameter (Exception Message)—ILE RPG
Example Refer to “Retrieving the Hold Parameter (Exception Message)—OPM RPG
Example” on page 3-6 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\ sent as escape messages.
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
D\
D\ Retrieve Job Description API Include
D\
D/COPY QSYSINC/QRPGLESRC,QWDRJOBD .2/
B-6 System API Programming V4R1