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

 

 

QSYNAMEð6

 

O

 

 

 

 

' Library: '

O

 

 

QSYBRARYð6

 

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

 

 

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”

 

 

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 u

 

 

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-112System API Programming

V4R1

 

 

Page 390
Image 390
IBM Version 4 manual Pointers-Examples, CBLERR1 Program, Without, Logging