Remove Exit Program and Deregister Exit Point—ILE RPG Example
Refer to “Remove Exit Program and Deregister Exit Point—ILE C Example” on
page 4-19 for the original example.
F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
F\
F\ Program: Remove an Exit Program
F\ Deregister an Exit Point
F\
F\ Language: ILE RPG
F\
F\ Description: This program removes an exit program and
F\ deregisters an exit point from the registration
F\ facility.
F\
F\ APIs Used: QusRemoveExitProgram - Remove Exit Program
F\ QusDeregisterExitPoint - Deregister Exit Point
F\
F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
F\
FQPRINT O F 132 PRINTER OFLIND(\INOF) USROPN
D\
D\ Error Code parameter include. As this sample program
D\ uses /COPY to include the error code structure, only the first
D\ 16 bytes of the error code structure are available. If the
D\ application program needs to access the variable length
D\ exception data for the error, the developer should physically
D\ copy the QSYSINC include and modify the copied include to
D\ define additional storage for the exception data.
D\
D/COPY QSYSINC/QRPGLESRC,QUSEC
D\
D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
D\Prototype for calling Deregister Exit Point API.
D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
D QUSDEP C 'QusDeregisterExitPoint'
D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
D\Prototype for calling Remove Exit Program API.
D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
D QUSREPGM C 'QusRemoveExitProgram'
D\
D\ Miscellaneous data
D\
DPGM_NBR 9B ð
DEPNTNAME S INZ('EXAMPLE_EXIT_POINT')
C\
C\ Beginning of mainline
C\
C\ Remove an exit program from the exit point and then deregister
C\ the exit point. It is not necessary to remove exit programs
C\ from an exit point before deregistering the exit point. It is
C\ done here only for illustrative purposes.
C\
C\ Initialize the error code parameter. To signal exceptions to
C\ this program by the API, you need to set the bytes provided
C\ field of the error code to zero. Because this program has
B-92 System API Programming V4R1