Fᑍ
Fᑍ Description: This program performs a divide-by- operation
Fᑍ to cause an exception. This exception is
Fᑍ caught using RPG ᑍPSSR support,
Fᑍ and the exception is then logged as a
Fᑍ software error.
Fᑍ
Fᑍ APIs used: QPDLOGER
Fᑍ
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Eᑍ
Eᑍ Arrays used to extract source line number where error happened
Eᑍ
E SRC 8 1
E TGT 8 1
Iᑍ
Iᑍ Error Code parameter include. As this sample program uses
Iᑍ /COPY to include the error code structure, only the first
Iᑍ 16 bytes of the error code structure are available. If the
Iᑍ application program needs to access the variable length
Iᑍ exception data for the error, the developer should physically
Iᑍ copy the QSYSINC include and modify the copied include to
Iᑍ define additional storage for the exception data.
Iᑍ
I/COPY QSYSINC/QRPGSRC,QUSEC
Iᑍ
Iᑍ Define Program Status Data Structure
Iᑍ
IPSDS SDS
I 1 1 PGMNAM
I 11 15STATUS
I 21 28 SRC
I 4 46 EXCPID
I 81 9 LIBNAM
Iᑍ
Iᑍ Some miscellaneous fields
Iᑍ
IMISC DS
I B 1 4FAILPT
I B 5 8DATA#
I B 9 12OBJS#
I 13 2 TGT
I 13 2LIN#C
Iᑍ
Iᑍ DATA represents the data items to report as part of problem
Iᑍ
IDATA DS 496
Iᑍ
Iᑍ DATAPT defines (via offset and length values) how to read DATA
Iᑍ
IDATAPT DS 256
I B 1 4DTAOFF
I B 5 8DTALEN
Iᑍ
Iᑍ OBJS represents the list of objects to spool as part of problem
Iᑍ
IOBJS DS 259
I 1 3 OBJ1N
Appendix B. Original Examples in Additional Languages B-117