IBM Version 4 Universal Remote User Manual


 
ᑍProgramming Language: COBOL
ᑍDescription: This example expects errors sent as
escape messages.
ᑍHeader Files Included: QUSEC - Error Code Parameter
QWDRJOBD - Retrieve Job Description API
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
PROGRAM-ID. JOBDAPI.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-AS4.
OBJECT-COMPUTER. IBM-AS4.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY QUSEC OF QSYSINC-QLBLSRC.
ᑍ Retrieve Job Description API Include
COPY QWDRJOBD OF QSYSINC-QLBLSRC. 2
ᑍ Command String Data Structure
1 COMMAND-STRING.
5 TEXT1 PIC X(26) VALUE 'SNDMSG MSG(''HOLD value is'.
5 HOLD PIC X(1).
5 TEXT2 PIC X(15) VALUE ''') TOUSR(QPGMR)'.
1 COMMAND-LENGTH PIC S9(1)V99999 COMP-3.
1 RECEIVER-LENGTH PIC S9(9) COMP-4. 4
1 FORMAT-NAME PIC X(8) VALUE 'JOBD1'. 5
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. 8
MAIN-LINE.
ᑍ Beginning of Mainline
ᑍ Move the two parameters passed into JOB-DESC and JOB-DESC-LIB. 9
Appendix B. Original Examples in Additional Languages B-5