The following is a high-level example of a CTRF exit routine:
- Locate the work area (field CTXIUSWA in the CTXI data area) and
determine if this routine has been called before.
- For the first call to this routine, do the following:
- Initialize CTXIUSWA.
- On the first call, parse the application-specific option string
to determine which CTEs must pass through filtering and be formatted.
If any errors occur, the CTRF exit routine issues an error message
using the IPCS expanded print service and sets a failing return code.
The routine saves the results in the work area.
- Apply application-unique filter options, or defaults, to the CTE.
- Set the return code.
- Return to the caller.