IBM Version 4 Universal Remote User Manual


 
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 error
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 program
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” on
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  operation 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 Languages B-119