\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 BLanguages-5

Page 283
Image 283
IBM Version 4 manual Cobol, PROGRAM-ID. Jobdapi Environment Division, Copy Qusec of QSYSINC-QLBLSRC, Linkage Section