C

Z-ADD5

DTALEN

C

Z-ADD1

DATA#

C\

 

 

C\ For illustration purposes also dump the program object￿ as

C\ part of logging the software error

 

 

C\

 

 

 

 

C

 

MOVELPGMNAM

OBJ1N

.1/

C

 

MOVELLIBNAM

OBJ1L

 

C

 

MOVEL'\PGM'

OBJ1T

 

C

 

Z-ADD1

OBJS#

 

C\

 

 

 

 

C\ Call the Log Software Error API

 

 

C\

 

 

 

 

C

 

CALL 'QPDLOGER'

 

 

C

 

PARM

PGMNAM

 

C

 

PARM EXCPID

MSGID

12

C

 

PARM

MSGKEY

4

C

 

PARM

FAILPT

 

C

 

PARM 'Y'

JOBLOG

1

C

 

PARM

DATA

 

C

 

PARM

DATAPT

 

C

 

PARM

DATA#

 

C

 

PARM

OBJS

 

C

 

PARM

OBJS#

 

C

 

PARM

QUSBN

 

C\

 

 

 

 

C\ If an error on the API call, then

indicate a terminal erro￿r

C\

 

 

 

 

C

QUSBNC

IFGT ð

 

 

C'TERM ERR'DSPLY

C

END

 

C

ELSE

C\

 

 

C\ If error within \PSSR,

then indicate \PSSR error

C\

 

 

C'\PSSR 'DSPLY

C

END

C\

 

C\ No matter how the program got to the \PPSR, end the progra￿m

C\

 

 

C

MOVE '1'

\INLR

C

RETRN

 

C

ENDSR

 

Logging Software Error (OPM

API without Pointers)—ILE

RPG

Example

Refer to

“Logging Software Error

(OPM

API without Pointers)—ILE C Example

page 6-2 for the original example.

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

F\

F\ Program:

Demonstrate use of OPM based Log Software Error

F\

 

F\ Language:

ILE RPG

F\

 

F\ Description: This program performs a divide by ð operati￿on to

F\

cause an exception. This exception is caught using

F\

RPG's \PSSR support, and the exception is then

Appendix B. Original Examples in Additional BLanguages-119

Page 397
Image 397
IBM Version 4 manual Logging Software Error OPM API without Pointers-ILE, API without Pointers-ILE C Example