Categories of AFP Applications

Applications that produce output intended to print on AFP printers are grouped into five categories. The categories are divided by the level of AFP architecture implementation. A detailed description of the five categories and how to implement them can be found in the IBM Advanced Function Printing Application Development GuideGG66-0255 and in Developing Advanced Application for PSF-Controlled PrintersGG66-3219. Following is a brief description of each of the categories:

Category 1

Once PSF is installed, all the output printed without using any AFP software is Category 1. This output is printed using PSF and AFP printers but does not take advantage of any AFP capabilities. Category 1 is usually used for a very short period.

The printing mode of Category 1 output is Line Mode.

Category 2

AFP printing characteristics are defined on an installation wide basis. All (or most) output is printed using the same printing characteristics. Category 2 is simple to implement because PAGEDEF and FORMDEF are used installation wide and only have to be defined in one place – the PSF procedure.

The printing mode of Category 2 output is also Line Mode.

Category 3

AFP printing characteristics are defined on a dataset basis. Each output dataset may use different AFP printing characteristics. PAGEDEF and/or FORMDEF can be defined in JCL, on a DD statement level. Each DD statement can refer to an OUTPUT statement, since PAGEDEF and FORMDEF printing parameters are assigned in the OUTPUT statement.

Category 3 is a very common method of printing AFP output. This is because of the simplicity of specifying the PAGEDEF and/or FORMDEF in the JCL. No application modifications are required.

The printing mode of Category 3 output is also Line Mode.

Category 4

AFP printing characteristics are defined on a page-by-page basis. Each page of the output may use different AFP printing characteristics.

There are a number of AFP structured fields that can be inserted in-line within the data stream. This insertion turns Category 3 output into Category 4 output. These structured fields are:

Table 1 Category 4 Structured Fields

Field

Description

IDM

Invoke Data Map

IMM

Invoke Medium Map

CTX/PTX

Composed-Text Data/Presentation-Text Data

IPS

Include Page Segment

IPO

Include Page Overlay (PSF version 2)

IDM and IMM

Category 4’s method of IDM and IMM command insertion is to assign a general PAGEDEF and/or FORMDEF on the dataset level (same as Category 3). The PAGEDEF consists of a number of Page Formats. The FORMDEF consists of a number of Copy Groups. By inserting an AFP structured field (command) in-line, the page is printed using a specific Page Format and/or Copy Group from within the defined PAGEDEF/FORMDEF.

Figure 1 Every PAGEDEF Can Consist of More Than One Page Format

To select a specific Page Format from a PAGEDEF, an AFP structured field must be inserted in-line at the beginning of the page. This AFP structured field is called IDM (Invoke Data Map).

Figure 2 Every FORMDEF Can Consist of More Than One Copy Group

To select a specific Copy Group from a FORMDEF, another AFP structured field is required at the beginning of the page. This AFP structured field is called IMM (Invoke Medium Map).

All subsequent line formats are now printed using that specific Page Format/Copy Group until superseded by a new IDM/IMM control record.

Pages that do not have an IDM or IMM structured field are printed with the most recent specified IDM or IMM. If the output does not contain an IDM or IMM, then PSF uses the default Page Format and Copy Group, whichever is listed first in the active PAGEDEF and FORMDEF.

CTX/PTX

CTX and PTX are the same (that is, before PSF version 2, PTX was called CTX). They enable you to specify presentation text data (composed text data) within Line Mode output. Lines and boxes can be drawn, fonts can be changed, and text can be positioned. A CTX/PTX can be inserted anywhere on a page. Unlike IDM and IMM, the CTX/PTX takes effect only for the specific page and position on which it appears.

IPS and IPO

IPS is used for including a Page Segment. IPO is used for including an Overlay in Category 4 output. IPS and IPO can be inserted anywhere on a page. Unlike IDM and IMM, when a page segment is included within a composed-text (CTX) page or overlay, remember that any image included in the segment has an orientation relative to the page or overlay orientation, not the text orientation.

The printing mode of Category 4 output is Line Mode.

Note: IPO is available only with PSF version 2 and above.

Category 5

AFP printing characteristics are defined on a free-form basis. Based on input data, the application (or software product) determines how to format the output. Category 5 output is also called AFPDS (AFP Data Stream). Category 5 output is most commonly produced by software packages such as DCF and GDDM. It is not yet common for user applications to produce Category 5 output.

The primary difference between Category 4 output and Category 5 output is that Category 5 output does not use a PAGEDEF. Each page is fully formatted by the application. Category 5 output does use a FORMDEF. One output dataset can contain both Category 5 output (Page Mode) and regular Line Mode output, but not on the same page.

The printing mode of Category 5 output is Page Mode.

When Page Mode printing is used, the print data stream presented to the printer is a combination of data and printer commands. It can be viewed online only with special software tools (for example, Control-D/WebAccess Server or AFP Workbench).

AFP Categories Summary

Any of the five AFP output categories can be implemented with Control-D. The next chapter contains a detailed discussion on implementing each of the AFP output categories.