IBM Version 4 manual Copy QSYSINC/QRPGLESRC,QPDSRVPG D, Inzrc, Dpsds

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 405
Image 405

D\ Include API structures and constants D\

D/COPY QSYSINC/QRPGLESRC,QPDSRVPG D\

D\ Array of problem record description pointers and index￿ to array D\

Dpdr

 

S

\

dim(2ð)

Dx

 

S

5B ð INZ(1)

D\

 

 

 

 

D\ Misc. data elements

 

 

D\

 

 

 

 

Dfactor1

S

5B ð INZ(1ð)

Dfactor2

S

5B ð INZ(ð)

Dresult

S

5B ð

 

Drc

 

S

2

INZ('RC')

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 nonexception mode

 

C\

 

 

 

 

 

C

 

eval

qusbprv = %size(qusec)

 

C\

 

 

 

 

 

C\ Record the suspected program and library name

 

C\

 

 

 

 

 

C

 

eval

qpdkð1 = 1ð1

 

 

C

 

eval

qpdpgmnl = %SIZE(pgm_name)

 

C

 

eval

qpdlibnl = %SIZE(lib_name)

 

C

 

eval

qpdpgmn = %ADDR(pgm_name)

.2/

C

 

eval

qpdlibn = %ADDR(lib_name)

 

C\

 

 

 

 

 

C\

and record

the key:

 

 

 

C\

 

 

 

 

 

Appendix B. Original Examples in Additional BLanguages-127

Page 405
Image 405
IBM Version 4 manual Copy QSYSINC/QRPGLESRC,QPDSRVPG D, Inzrc, Dpsds