Appendix B. User Exits
This appendix describes the user exits that are referred to in “Defining User Exit
Before and Middle”on page 94 and “Defining User Exit After” on page 96.

Processing Phases

Following is a description of the processing phases the APU print engine goes
through in general and when processing the user exits:
Table3. APU Print Engine Processing Phases
Step Description Modified Version
Program Name Pre-Modification
Equivalent
1 Call the user exit program
“before” EXTBEF None
2 Set up the internal environment
using the print definition. INZENV INZENV
3 Create the internal spool
database using the CPYSPLF
command.
CPYSPLF CPYSPLF
4 Call the “middle” user exit. EXTMID None
5 Process the input file and create
an AFPDS output database. GENAFP GENAFP
6 Convert the database to the
spooled file using the
PRTAFPDTAcommand.
PRTAFPDTA PRTAFPDTA
7 Call the “after” user exit
program. EXTAFT None
8 Perform post-processing action
on the SCS spooled file. INPACT None

User Exit Before

The USER EXIT BEFORE program includes the library the program is in and a 20
character user parameter to be passed to the exit program. This program (phase
EXTBEF) will be executed before the print engine starts to initialize (phase
INZENV,which sets up the internal environment such as variables, tables, and so
on) using the print definition.
Following is the parameter structure passed by the APU print engine if a user exit
is called for BEFORE processing is initialized:
© Copyright IBM Corp. 1996, 2002 103