Cᑍ
C APINAM DSPLY
C QUSEI DSPLY
C EXSR DONE
C ENDSR
Cᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
C DONE BEGSR
Cᑍ
Cᑍ Exit the program
Cᑍ
C EXCEPT END_LIST
C EVAL ᑍINLR = '1'
C RETURN
C ENDSR
OQPRINT E OBJ_ENTRY 1
O 'Object: '
O QSYNAME6
O ' Library: '
O QSYBRARY6
O ' Type: '
O QSYOBJT13
O ' Text: '
O QSYOBJT14
OQPRINT E END_LIST 1
O 'ᑍᑍᑍ End of List'
OPM API without Pointers—Examples
This section includes the examples in “Reporting Software Error (ILE API with
Pointers)—ILE C Example” on page 6-7.
Logging Software Error (OPM API without Pointers)—OPM COBOL
Example
Refer to “Logging Software Error (OPM API without Pointers)—ILE C Example” on
page 6-2 for the original example. This example uses two programs: CBLERR1
causes the error, and ERRHDL1 shows how to log the software error using the
QPDLOGER API.
CBLERR1 Program
IDENTIFICATION DIVISION.
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍ
ᑍ Program: Register an OPM COBOL Error Handler
ᑍ Cause a data decimal exception to demonstrate
ᑍ logging of software errors
ᑍ
ᑍ Language: COBOL
ᑍ
ᑍ Description: This program registers an OPM COBOL Error
ᑍ Handler. After the successful completion of
ᑍ the registration of the error handler, this ,
ᑍ program creates a data decimal error. This
ᑍ exception causes the error handler to be
ᑍ called which then logs the software error.
B-112 System API Programming V4R1