IBM Version 4 Universal Remote User Manual


 
C MOVE '1' REC,OF
C EXSR CALCVO
C Z-ADD3 QUSBCC
C Z-ADD4 QUSBCD
C Z-ADD37 BINARY
C 12 ADD VO OF 5
C MOVEABINC REC,OF
C EXSR CALCVO
C
Cᑍ Call the API to add the exit program.
C
C CALL 'QUSADDEP'
C PARM EPNTNM
C PARM 'EXMP1'FORMAT
C PARM 1 BINARY
C PARM EPGM
C PARM EPGMDT
C PARM EPGMSZ
C PARM VARREC
C PARM QUSBN
C
Cᑍ If an exception occurs, the API returns the exception in the
Cᑍ error code parameter. The bytes available field is set to
Cᑍ zero if no exception occurs and greater than zero if an
Cᑍ exception does occur.
C
C QUSBNC IFGT 
C OPEN QPRINT
C EXCPTERRPGM
C EXSR DONE
C ENDIF
C EXSR DONE
C
Cᑍ End of MAINLINE
C
C
Cᑍ Return to programs caller
C DONE BEGSR
C SETON LR
C RETRN
C ENDSR
C
Cᑍ Calculate 4-byte aligned offset for next variable length record
C
C CALCVO BEGSR
C QUSBCD ADD 12 BINARY
C DIV 4 BINARY
C MVR BINARY
C BINARY IFEQ 
C QUSBCD ADD 12 QUSBCB
C ELSE
C 4 SUB BINARY QUSBCB
C ADD QUSBCD QUSBCB
C ADD 12 QUSBCB
C END
C MOVEAQUSBC REC,VO
C ADD QUSBCB VO
C ENDSR
Appendix B. Original Examples in Additional Languages B-57