Print AFP data generated on the iSeries™ server

Follow these steps to generate and print i5/OS Advanced Function Presentation™ data stream (AFPDS) data with Print Services Facility™ (PSF):

  1. Create the AFPDS data.
  2. Optional: Specify overlays.
  3. Generate an AFPDS spooled file.

    Method 1: Use an application program. The application program that creates the data to be used with the overlays might need to be tailored so the printed output fits with the overlays you designed.

    Tailoring the program to fit the overlay is similar to tailoring the program to work with a preprinted form.

    Method 2: Use the Print AFP™ Data (PRTAFPDTA) command. If you have a database file that contains AFP data, use the PRTAFPDTA command to spool the file.

    If you want to use a prompt display with this command, type PRTAFPDTA and press F4 (Prompt).

    Notes:
    1. The PRTAFPDTA command prints AFPDS data. Any padding between the AFPDS structured fields must be X'40' or X'00'.
    2. When using the PRTAFPDTA command, do not override the DEVTYPE parameter on the system printer file, QSYSPRT.
    3. When using the PRTAFPDTA command, the form definition typically identifies the drawer to print from. An exception is when an Override with Printer File (OVRPRTF) command has been issued with a different drawer value. In this case, the drawer value is taken from the override command.

    Examples

    This command prints the first member in file MYFILE starting with page 2 and ending on page 6.

    PRTAFPDTA  FILE(MYLIB/MYFILE) STRPAGE(2)  ENDPAGE(6)

    This command prints the member $REPORT in file MYFILE using a form definition of F10101 and all available exception handling.

    PRTAFPDTA  FILE(MYLIB/MYFILE) MBR($REPORT)  FORMDF(F10101)  FIDELITY(*CONTENT)
  4. Release the spooled file to a device with device type *AFPDS.

Related reference

Print AFP Data (PRTAFPDTA) CL command