IBM Version 4 Universal Remote User Manual


 
BY CONTENT LENGTH OF EXIT-PGM-DATA OF MISC,
VARREC, QUS-EC.
ᑍ If an exception occurs, the API returns the exception in the
ᑍ error code parameter. The bytes available field is set to
ᑍ zero if no exception occurs and greater than zero if an
ᑍ exception does occur.
IF BYTES-AVAILABLE OF QUS-EC > 
OPEN OUTPUT LISTING,
MOVE EXCEPTION-ID OF QUS-EC
TO EXCEPTION-ID OF BAD-ADD,
WRITE LIST-LINE FROM BAD-ADD,
STOP RUN.
STOP RUN.
ᑍ End of MAINLINE
ᑍ Calculate 4-byte aligned offset for next variable length record
CALCULATE-NEXT-OFFSET.
COMPUTE BINARY-NUMBER = LENGTH-DATA OF QUS-VLEN-REC-4 + 12.
DIVIDE BINARY-NUMBER BY 4 GIVING BINARY-NUMBER REMAINDER X.
IF X =  COMPUTE LENGTH-VLEN-RECORD OF QUS-VLEN-REC-4 =
LENGTH-DATA OF QUS-VLEN-REC-4 + 12
ELSE COMPUTE LENGTH-VLEN-RECORD OF QUS-VLEN-REC-4 =
LENGTH-DATA OF QUS-VLEN-REC-4 + 12 +
( 4 - X ).
MOVE QUS-VLEN-REC-4 TO VAR-RECORDS(VAR-OFFSET:12).
COMPUTE VAR-OFFSET = VAR-OFFSET + LENGTH-VLEN-RECORD OF
QUS-VLEN-REC-4.
Register Exit Point and Add Exit Program—OPM RPG Example
Refer to “Register Exit Point and Add Exit Program—ILE C Example” on page 4-9
for the original example.
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
F
Fᑍ Program: Register an Exit Point
Fᑍ Add an Exit Program
F
Fᑍ Language: OPM RPG
F
Fᑍ Description: This program registers an exit point with the
Fᑍ registration facility. After the successful
Fᑍ completion of the registration of the exit point,
Fᑍ an exit program is added to the exit point.
F
Fᑍ APIs Used: QUSRGPT - Register Exit Point
Fᑍ QUSADDEP - Add Exit Program
F
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
F
B-54 System API Programming V4R1