IBM Version 4 manual Src Tgt, Ipsds, Excpid, Imisc, Idatapt, Iobjs

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 395
Image 395

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 ha￿ppened 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 lengt￿h

I\ exception data for the error, the developer should physi￿cally

I\ copy the QSYSINC include and modify the

copied include t￿o

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

15ðSTATUS

I

 

21

28 SRC

I

 

46 EXCPID

I

 

81

9ð LIBNAM

I\

 

 

 

I\ Some miscellaneous fields

 

 

I\

 

 

 

IMISC

DS

 

 

I

B

1

4ðFAILPT

I

B

5

8ðDATA#

I

B

9

12ðOBJS#

I

 

13

2ð TGT

I

 

13

2ððLIN#C

I\

 

 

 

I\ DATA represents the data items to report as part of prob￿lem

I\

 

 

 

IDATA

DS

 

4ð96

I\

 

 

 

I\ DATAPT defines (via offset and length values) how to read￿ DATA

I\

 

 

 

IDATAPT

DS

 

256

I

B

1

4ðDTAOFF

I

B

5

8ðDTALEN

I\

 

 

 

I\ OBJS represents the list of objects to spool as part of p￿roblem

I\

 

 

 

IOBJS

DS

 

259ð

I

 

1

3ð OBJ1N

 

Appendix B. Original

Examples in Additional BLanguages-117

Page 395
Image 395
IBM Version 4 manual Src Tgt, Ipsds, Excpid, Imisc, Idatapt, Iobjs