IBM Version 4 Universal Remote User Manual


 
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 1
D status 11 15
D src_line 21 28
D exception 4 46
D lib_name 81 9
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 ᑍPSSR
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 Languages B-127