\

ERRHDL2 Program

PROCESS NOMONOPRC. IDENTIFICATION DIVISION.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\

\ Program: Log a software error

\

\Language: ILE COBOL

\Description: This program receives control for exceptions

\

within

a COBOL

run unit.

This program is used

 

\

in conjunction

with CBLERR2.

,

\

Any exception causes this

error handler to be

 

\

called

which then logs the software error.

 

\

 

 

 

 

 

\APIs Used: QpdReportSoftwareError

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

PROGRAM-ID. ERRHDL2.

ENVIRONMENT DIVISION. CONFIGURATION SECTION.

SOURCE-COMPUTER. IBM-AS4ðð. OBJECT-COMPUTER. IBM-AS4ðð.

SPECIAL-NAMES.

LINKAGE TYPE PROCEDURE FOR "QpdReportSoftwareError".

INPUT-OUTPUT SECTION. FILE-CONTROL.

DATA DIVISION. WORKING-STORAGE SECTION.

\Error Code parameter include. As this sample program

\uses COPY to include the error code structure, only the fi￿rst

\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 physic￿ally

\copy the QSYSINC include and modify the copied include to￿

\define additional storage for the exception data.

\

COPY QUSEC OF QSYSINC-QCBLLESRC.

\

\QpdReportSoftwareError include

COPY QPDSRVPG OF QSYSINC-QCBLLESRC.

\

\Miscellaneous elements

ð1 MISC.

ð5 NBR-OF-RECORDS ð5 MSG-KEYWORD

ð1 PROBLEM-RECORDS. ð5 PROBLEM-POINTER

LINKAGE SECTION.

PIC S9(ð9) BINARY VALUE ð. PIC X(ð3) VALUE "MSG".

POINTER OCCURS 1ðð TIMES.

B-124System API Programming V4R1

Page 402
Image 402
IBM Version 4 manual ERRHDL2 Program, PROGRAM-ID. ERRHDL2, Copy Qpdsrvpg of QSYSINC-QCBLLESRC