F\

 

logged as a software error.

 

 

 

F\

 

 

 

 

 

 

F\ APIs used:

QPDLOGER

 

 

 

 

F\

 

 

 

 

 

 

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

 

D\

 

 

 

 

 

 

D\ Include Error Code Parameter

 

 

 

D\

 

 

 

 

 

 

D/COPY QSYSINC/QRPGLESRC,QUSEC

 

 

 

 

D\

 

 

 

 

 

 

D\ Misc. data elements

 

 

 

 

D\

 

 

 

 

 

 

Dfactor1

S

5B ð INZ(1ð)

 

 

Dfactor2

S

5B ð INZ(ð)

 

 

 

Dresult

S

5B ð

 

 

 

Dline_nbr

S

9B ð

 

 

 

Ddata

DS

4ð96

 

 

 

Ddatapt

DS

 

 

 

 

D data_off

 

9B ð

 

 

 

D data_len

 

9B ð

 

 

 

Ddata#

S

9B ð

 

 

 

Dobjl

DS

259ð

 

 

 

Dobjl#

S

9B ð

 

 

 

D\

 

 

 

 

 

 

D\ Program status data structure

 

 

 

D\

 

 

 

 

 

 

DPSDS

SDS

 

 

 

 

D pgm_name

1

 

 

 

D status

11

15 ð

 

 

 

D src_line

21

28

 

 

 

D exception

46

 

 

 

D lib_name

81

 

 

 

C\

 

 

 

 

 

 

C\ Attempt to divide by ð

 

 

 

 

C\

 

 

 

 

 

 

C

factor1

div

factor2

result

 

 

C\

 

 

 

 

 

 

C\ Should not get here due to divide by ð exception

 

 

C\

 

 

 

 

 

 

C

 

move

'1'

\INLR

 

 

C

 

return

 

 

 

 

C\

 

 

 

 

 

 

C\ Program exception subroutine:

 

 

 

C\

 

 

 

 

 

 

C

\PSSR

BEGSR

 

 

 

 

C\

 

 

 

 

 

 

C\ Make sure we are not catching an exception due to the \PSS￿R

 

C\ subroutine itself

 

 

 

 

C\

 

 

 

 

 

 

C

switch

ifeq

' '

 

 

 

C

 

move

'1'

switch

1

 

C\

 

 

 

 

 

 

C\ Set API error code to work in non-exception mode

 

 

C\

 

 

 

 

 

 

C

 

eval

qusbprv = %size(qusec)

 

 

C\

 

 

 

 

 

 

C\ Record line number where error happened

 

 

 

C\

 

 

 

 

 

B-120

System API Programming

V4R1

 

 

 

 

Page 398
Image 398
IBM Version 4 manual 120, Dpsds SDS