How to Implement AFP Output by Categories

This chapter describes how Control-D retrieves data and printing characteristics in each of the five AFP output categories. In other words, this chapter outlines how to implement AFP output by categories.

Category 1

Category 1 output does not require any Control-D actions. The output is printed as it is produced by the application program. Do not assign any printing characteristics to Category 1 output in Control-D.

Using CDAM Allocation Option JOBSDSNn With Category 1 Output

When many small reports are produced by many jobs, the CDAM allocation option JOBSDSN1 (for Category 1) is recommended. Using this method, output is written to the system spool (that is, not using the "Direct to CDAM" method). For additional information on the CDAM allocation option JOBSDSN1, see Chapter 5 of the Control-D and Control-V User Guide.

Category 2

Category 2 output relies on global system printing characteristics defined in the PSF procedure. No Control-D actions are required, and no printing characteristics are assigned to Category 2 output in Control-D.

Using CDAM Allocation Option JOBSDSNn With Category 2 Output

When many small reports are produced by many jobs, the CDAM allocation option JOBSDSN1 (for Category 2) is recommended. Using this method, output is written to the system spool (that is, not using the "Direct to CDAM" method). For additional information on the CDAM allocation option JOBSDSN1, see Chapter 5 of the Control-D and Control-V User Guide.

Category 3

Category 3 output uses printing characteristics that are defined in external resource libraries (for example, Fonts, FORMDEFs, PAGEDEFs, and so on). Printing characteristics, with the exception of the FORMDEF and PAGEDEF parameters, can be specified using a number of methods. The FORMDEF and PAGEDEF parameters must be specified in an OUTPUT statement in the JCL of the job that creates the output. The rest of the printing characteristics can be specified by the application program in the JCL of the job that creates the output, using dynamic allocation (SVC99).

In data centers that use a relatively small variety of PAGEDEFs and FORMDEFs, it may be an advantage to use the combined PAGEDEF and FORMDEF method. This method relies on the creation of one global PAGEDEF and one global FORMDEF used by the entire data center. Using the Control-D APAPARM option, the correct Page Format and Copy Group is used for each report. For additional details regarding this method, refer to Using a Global PAGEDEF and FORMDEF.

Category 3 Output Using the Spool Method

Control-D automatically retrieves all the printing characteristics that are available on the DD statement level. Here are two examples of using the spool method:

All printing characteristics are defined in JCL; none appears in the decollating mission definition:

Figure 9, Example 1: Category 3 Output Using the Spool Method. JCL

Copy
//MYJOB1  jobcard
//STEP01  EXEC  PGM=MYPROG
//SYSUT1  DD    DSN=ABC.DEF
//SYSUT2  DD    SYSOUT=P,CHARS=GS10,FCB=STD2
//

Figure 10, Example 1: Category 3 Output Using the Spool Method. Decollating Mission Definition

Copy
ON CLASS      = P         EXTWTR               DEST          FORM
PRT COPIES 01 LVL 20 USER MGT                  DEST RUR252   MAX COPIES
PRINT/CDAM PARMS =
WHEN LINE     -     COL     -      PRINT  REF NEXT PAGE   CONTID   AND/OR
STRING =

Certain printing characteristics are defined in the JCL; others are defined in the decollating mission definition:

Figure 11, Example 2: Category 3 Output Using the Spool Method. JCL

Copy
//MYJOB2  jobcard
//STEP01  EXEC  PGM=MYPROG
//SYSUT1  DD    DSN=ABC.DEF
//SYSUT2  DD    SYSOUT=P,CHARS=GS10

Figure 12, Example 2: Category 3 Output Using the Spool Method. Decollating Mission Definition

Copy
ON CLASS      = P         EXTWTR               DEST          FORM
PRT COPIES 01 LVL 20 USER MGT                  DEST RUR252   MAX COPIES
PRINT/CDAM PARMS =  PAGEDEF=W240F2,FORMDEF=A11010
WHEN LINE     -     COL     -      PRINT  REF NEXT PAGE   CONTID   AND/OR
STRING =

Using CDAM Allocation Option JOBSDSNn With Category 3 Output

When many small reports are produced by many jobs and each report may have different printing characteristics, using the CDAM allocation option JOBSDSN2 (for Category 3) is recommended. Using this method, output is written to the system spool (that is, not using the "Direct to CDAM" method). Only when many small reports are produced with the same printing characteristics (for example, MSGCLASS output), CDAM allocation option JOBSDSN1 is recommended. For additional information on CDAM allocation options JOBSDSN1 and JOBSDSN2, refer to Chapter 5 of the Control-D and Control-V User Guide.

Category 3 Output Using the CDAM Method

During the decollating process, Control-D retrieves all printing characteristics of the output as specified in the SUBSYS DD statement. No additional actions need to be performed. Printing characteristics can also be assigned in the decollating mission. This can be performed by specifying the printing characteristics in the PRINT/CDAM PARMS field of the decollating mission definition. When defining printing characteristics in the PRINT/CDAM PARMS field, Control-D performs a syntax check on the printing parameters. Any printing characteristics that appear in the PRINT/CDAM PARMS field override printing characteristics that were specified in the SUBSYS DD statement of the job that created the output.

All printing characteristics are defined in the JCL; none is defined in the decollating mission definition:

Figure 13, Example 1: Category 3 Output Using CDAM Method. JCL

Copy
//MYJOB1  jobcard
//STEP01  EXEC  PGM=MYPROG
//SYSUT1  DD    DSN=ABC.DEF
//SYSUT2  DD    SUBSYS=(CDAM,'SYSOUT=P,CHARS=GS10,'
//            'PAGEDEF=W240F2,FORMDEF=A11010,PREFIX=M73')

As you can see in the above example, the CDAM parameters can span more than one line. Be sure to follow this syntax.

Figure 14, Example 1: Category 3 Output Using CDAM Method. Decollating Mission Definition

Copy
ON DSN        = PREFIX=M73
PRT COPIES 01 LVL 20 USER MGT                  DEST RUR252   MAX COPIES
PRINT/CDAM PARMS =
WHEN LINE     -     COL     -      PRINT  REF NEXT PAGE   CONTID   AND/OR
STRING =

Certain printing characteristics are defined in the JCL; others are defined in the decollating mission definition:

Figure 15, Example 2: Category 3 Output Using CDAM Method. JCL

Copy
//MYJOB2  jobcard
//STEP01  EXEC  PGM=MYPROG
//SYSUT1  DD    DSN=ABC.DEF
//SYSUT2  DD  SUBSYS=(CDAM,'SYSOUT=P,CHARS=GS10,PREFIX=M73')

Figure 16, Example 2: Category 3 Output Using CDAM Method. Decollating Mission Definition

Copy
ON DSN        = PREFIX=M73
PRT COPIES 01 LVL 20 USER MGT                  DEST RUR252   MAX COPIES
PRINT/CDAM PARMS =  PAGEDEF=W240F2,FORMDEF=A11010
WHEN LINE     -     COL     -      PRINT  REF NEXT PAGE   CONTID   AND/OR
STRING =

No printing characteristics are defined in the JCL; all printing characteristics are defined in the decollating mission definition.

Figure 17, Example 3: Category 3 Output Using CDAM Method. JCL

Copy
//MYJOB2  jobcard
//STEP01  EXEC  PGM=MYPROG
//SYSUT1  DD    DSN=ABC.DEF
//SYSUT2  DD    SUBSYS=CDAM

Figure 18, Example 3: Category 3 Output Using CDAM Method. Decollating Mission Definition

Copy
ON CLASS      = P         EXTWTR               DEST          FORM
PRT COPIES 01 LVL 20 USER MGT                  DEST RUR252   MAX COPIES
PRINT/CDAM PARMS =  SYSOUT=P,CHARS=GS10
PRINT/CDAM PARMS =  PAGEDEF=PDEF1,FORMDEF=A11010
WHEN LINE     -     COL     -      PRINT  REF NEXT PAGE   CONTID   AND/OR
STRING =

As the above example illustrates, multiple lines of the PRINT/CDAM PARMS parameter must not be delimited by a comma.

Printing characteristics can also be specified by job name and report name or by recipient name and report name. For more information, see 8 The OUTPARM Option.

Each ON statement of the decollating mission has a PRINT/CDAM PARMS field. The printing characteristics that are specified in this field are used for all output processed by this ON statement. When the PRINT/CDAM PARMS field is used (that is, parameters are specified), a new PRINT/CDAM PARMS line opens so that additional printing characteristics can be specified if required.

Category 4

Category 4 output uses printing characteristics (for example, Fonts, FORMDEFs, PAGEDEFs, and so on) that are defined in external resource libraries. Additional in-line AFP commands (structured fields) are used for page formatting.

The external resources can be specified using a number of methods. (The exceptions are the FORMDEF and PAGEDEF parameters; these parameters must be specified in an OUTPUT statement in the JCL of the job that creates the output.) The printing characteristics (except FORMDEF and PAGEDEF) can be specified by the application program in the JCL of the job that creates the output, using dynamic allocation (SVC99).

Without Control-D, the in-line structured fields must be inserted by the application program or by using the PPFA Conditional Processing option. They can be automatically inserted using the Control-D APAPARM option, described in 6 The APAPARM Option.

In data centers that use a relatively small variety of PAGEDEFs and FORMDEFs, it may be advantageous to use the combined PAGEDEF and FORMDEF method. This method relies on the creation of one global PAGEDEF and one global FORMDEF used by the entire data center. Using the Control-D APAPARM option, the correct Page Format and Copy Group is used for each report. For additional details regarding this method, see Using a Global PAGEDEF and FORMDEF.

Category 4 Output Using the Spool Method

Certain printing characteristics are defined in the JCL statements or in the decollating mission definition and certain can be defined with the APAPARM option. For additional information, see 6 The APAPARM Option.

Figure 21, Example 2: Category 4 Output Using the Spool Method. JCL

Copy
//PRTAFP2  jobcard
//STEP01   EXEC  PGM=MYPROG
//SYSUT1   DD    DSN=ABC.DEF
//SYSUT2   DD    SYSOUT=P,CHARS=GS10,
//

Figure 22, Example 2: Category 4 Output Using the Spool Method. Decollating Mission Definition

Copy
ON CLASS      = P         EXTWTR               DEST          FORM
PRT COPIES 01 LVL 20 USER MGT                  DEST RUR252   MAX COPIES
PRINT/CDAM PARMS =  PAGEDEF=PDEF1,FORMDEF=A11010
WHEN LINE     -     COL     -      PRINT  REF NEXT PAGE   CONTID   AND/OR
STRING =
Member PRTAFP2 in the APAPARM library must contain the following:
+++UPDATE REPORT
IDM=PFRMT1

Using CDAM Allocation Option JOBSDSNn With Category 4 Output

When many small reports are produced by many jobs and each report may have different printing characteristics, using the CDAM allocation option JOBSDSN2 (for Category 4) is recommended. Using this method, output is written to the system spool (that is, not directly to CDAM). When many small reports are produced with the same printing characteristics (for example, MSGCLASS output), CDAM allocation option JOBSDSN1 is recommended. For additional information on CDAM allocation options JOBSDSN1 and JOBSDSN2, refer to Chapter 5 of the Control-D User Guide.

The job name is PRTAFP1 and the report name is UPDATE REPORT. Assume that PAGEDEF, named PDEF, includes the Page Format named PFRMT1. The UPDATE REPORT requests that the specific Page Format named PFRMT1 be used. The job uses the default FORMDEF.

Figure 19, Example 1: Category 4 Output Using the Spool Method. JCL

Copy
//PRTAFP1  jobcard
//STEP01   EXEC  PGM=MYPROG
//SYSUT1   DD    DSN=ABC.DEF
//SYSUT2   DD    SYSOUT=P,CHARS=GS10,FCB=PDEF
//

The member PRTAFP1 in the APAPARM library can contain the following:

Figure 20, Example 1: Category 4 Output Using the Spool Method. Decollating Mission Definition

Copy
+++UPDATE REPORT
IDM=PFRMT1

The FCB parameter, in the AFP environment, can be used to specify the desired PAGEDEF.

Category 4 Output Using the CDAM Method

The following are examples of Category 4 using the CDAM Method.

The job name is PRTAFP1 and the report name is UPDATE REPORT. Assume that the PAGEDEF, named PDEF1, includes the Page Format named PFRMT1. The UPDATE REPORT requests that the specific Page Format named PFRMT1 be used.

Figure 23, Example 1: Category 4 Output Using CDAM Method. JCL

Copy
//PRTAFP1  jobcard
//STEP01   EXEC  PGM=MYPROG
//SYSUT1   DD    DSN=ABC.DEF
//SYSUT2   DD    SUBSYS=(CDAM,'SYSOUT=P,CHARS=GS10,'
//          'PAGEDEF=PDEF1,FORMDEF=A11010')
//

The member PRTAFP1 in the APAPARM library must contain the following:

Figure 24, Example 1: Category 4 Output Using CDAM Method. Decollating Mission Definition

Copy
+++UPDATE REPORT
IDM=PFRMT1

Figure 25, Example 2: Category 4 Output Using CDAM Method. JCL

Copy
//PRTAFP2  jobcard
//STEP01   EXEC  PGM=MYPROG
//SYSUT1   DD    DSN=ABC.DEF
//SYSUT2   DD    SUBSYS=CDAM
//

Figure 26, Example 2: Category 4 Output Using CDAM Method. Decollating Mission Definition

Copy
ON CLASS      = P         EXTWTR               DEST          FORM
PRT COPIES 01 LVL 20 USER MGT                  DEST RUR252   MAX COPIES
PRINT/CDAM PARMS =  SYSOUT=P,CHARS=GS10
PRINT/CDAM PARMS =  PAGEDEF=PDEF1,FORMDEF=A11010
WHEN LINE     -     COL     -      PRINT  REF NEXT PAGE   CONTID   AND/OR
STRING =

The member PRTAFP2 in the APAPARM library can contain the following:

Copy
+++UPDATE REPORT
IDM=PFRMT1

Category 5

Category 5 output uses printing characteristics (for example, Fonts, FORMDEFs, and so on) that are defined in external resource libraries. Each page is completely formatted using AFP structured fields, and therefore the output is in page mode (AFPDS). Additional in-line AFP commands (structured fields) can be used, for example, for page-by-page copy grouping.

The external resources can be specified using a number of methods, with the exception of the FORMDEF parameter. The FORMDEF parameter must be specified in an OUTPUT statement in the JCL of the job that creates the output. The rest of the printing characteristics can be specified by the application program in the JCL of the job that creates the output, using dynamic allocation (SVC99). The application program can switch between Copy Groups or Page Formats.

Without Control-D, the in-line structured fields must be inserted by the application program. With Control-D, they can be automatically inserted using the APAPARM option, described in 6 The APAPARM Option.

In data centers that use a relatively small variety of FORMDEFs, it may be advantageous to use the combined FORMDEF method. This method relies on the creation of one global FORMDEF for the requirements of the entire data center. Using the Control-D APAPARM Option, the correct Copy Group is used for each report. For additional details regarding this method, see Using a Global PAGEDEF and FORMDEF.

Using CDAM Allocation Option JOBSDSN2 With Category 5 Output

When many small reports are produced by many jobs, and each report may have different printing characteristics, you should use the CDAM allocation option JOBSDSN2 (for Category 5). With this method, output is written to the system spool (that is, not directly to CDAM).