IBM Version 4 Universal Remote User Manual


 
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 'JOBD1'.
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-JOBD1, 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