1 MESSAGE-TWO.
5 MSG2A PIC X(43)
VALUE 'SNDMSG MSG(''Program failed with message ID'.
5 MSGIDD PIC X(7).
5 MSG2B PIC X(15) VALUE ''') TOUSR(QPGMR)'.
ᑍ
1 COMMAND-LENGTH PIC S9(1)V99999 COMP-3.
1 RECEIVER-LENGTH PIC S9(9) COMP-4.
1 FORMAT-NAME PIC X(8) VALUE 'JOBD1'.
1 QCMDEXC PIC X(1) VALUE 'QCMDEXC'.
ᑍ
ᑍ Job Description and Library Name Structure
ᑍ
1 JOBD-AND-LIB-NAME.
5 JOB-DESC PIC X(1).
5 JOB-DESC-LIB PIC X(1).
ᑍ
LINKAGE SECTION.
ᑍ
ᑍ Two Parameters are being passed into this program.
ᑍ
1 JOBD PIC X(1).
1 JOBDL PIC X(1).
ᑍ
PROCEDURE DIVISION USING JOBD, JOBDL.
MAIN-LINE.
ᑍ
ᑍ Beginning of Mainline
ᑍ
ᑍ Move the two parameters passed into JOB-DESC and JOB-DESC-LIB.
ᑍ
MOVE JOBD TO JOB-DESC.
MOVE JOBDL TO JOB-DESC-LIB.
ᑍ
ᑍ Error Code Parameter is set to 16.
ᑍ
MOVE 16 TO BYTES-PROVIDED. 15
ᑍ
ᑍ Receiver Length Set to 39.
ᑍ
MOVE 39 TO RECEIVER-LENGTH.
ᑍ
ᑍ Call the QWDRJOBD API.
ᑍ
CALL QWDRJOBD USING QWD-JOBD1, RECEIVER-LENGTH,
FORMAT-NAME, JOBD-AND-LIB-NAME, QUS-EC.
ᑍ
ᑍ See if any errors were returned in the error code parameter.
ᑍ
PERFORM ERRCOD.
ᑍ
ᑍ 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.
ᑍ
Appendix B. Original Examples in Additional Languages B-13