ᑍ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 'JOBD1'. 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