rec_ptr += 11;
if((offset + 1ð) >= rec_len)
break;
offset += 11;
}
}
} /\ main \/
Accessing a Field Value (Initial Library List)—ILE COBOL Example
Refer to “Accessing a Field Value (Initial Library List)—OPM RPG Example” on
page 3-19 for the original example. The following program also works for OPM
COBOL.
IDENTIFICATION DIVISION.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\
\Program Name: JOBDAPI
\
\Programming Language: COBOL
\
\Description: This example shows how to access a
\ field value returned from a retrieve
\ API.
\
\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.
\
\ Error Code parameter include. As this sample program
\ uses COPY to include the error code structure, only the first
\ 16 bytes of the error code structure are available. If the
\ application program needs to access the variable length
\ exception data for the error, the developer should physically
\ copy the QSYSINC include and modify the copied include to
\ define additional storage for the exception data.
\
COPY QUSEC OF QSYSINC-QLBLSRC.
\
\ Retrieve Job Description API Include
\
\ The header file for the QWDRJOBD API was included in this
Appendix B. Original Examples in Additional Languages B-25