The APAPARM Option

The APAPARM option is intended mainly for Category 4 output. It can be used for Category 3 output, and then the output is actually changed to Category 4 output. In certain cases, the APAPARM option may be required for Category 5 output.

The APAPARM option provides the ability to implement advanced AFP capabilities with minimum effort. Certain advanced AFP capabilities require application program modifications. When the APAPARM option is used, some of these capabilities can be implemented without having to modify application programs. In this way, the data center can take full advantage of many versatile AFP capabilities.

The APAPARM option is capable of assigning Page Formats and Copy Groups on a report level (not only on a DD statement level).

Category 4 Structured Fields

As mentioned in a previous chapter, there are a number of structured fields that can be used (that is, inserted in-line into the output) for Category 4 output. As a reminder, these structured fields are:

Table 2 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 and above)

The APAPARM option can insert any structured field in the output. This includes structured fields that are not used for Category 4 output. It is extremely uncommon to require the in-line insertion of structured fields that are not Category 4 structured fields. Therefore, the following section discusses only Category 4 implementation using the APAPARM option.

Implementing the APAPARM Option

During the Control-D installation process, each channel attached (local) printer in the data center is defined. In CTDX003, the type of each printer is specified. CTDX003 resides in the IOA SAMPEXIT library. For each printer that is defined APA (for example, AFP printer), Control-D invokes the APAPARM option.

Example of the printer type definition in CTDX003 of AFP type printers:

Figure 27 Example of the Printer Type Definition in CTDX003 of AFP Type Printers

Copy
    CTDUX003        PRINTRS= (PRT1,APA,                             * 
                             PRT2,APA,                              *
                             PRT3,APA,                              *
                             PRT4,APA),                             *
                             INDEX=ON,                              *
                             BANNER=NO

A special library is used to define the structured fields for each report. This library is allocated to DD statement DAAPA in the Control-D Printers Control monitor (that is, CTDPRINT). The original name of this library is olprefd.olverd.APAPARM.

The library can be defined with RECFM set to V or to F. BMC recommend that you set RECFM to V, because if you set RECFM to F, you must add four bytes (RDW) before every AFP structured field.

Installations that already use the APAPARM option with a library that has RECFM set to F can use the CTDCNVAP utility (described in the procedure by that name in the IOA PROCLIB library) to automatically convert the setting of RECFM to V.

The APAPARM library contains one member for each job which produces output that requires structured fields to be inserted. The member name must be identical to the job name. Each member contains structured fields for all reports produced by the job.

Not all the AFP jobs and reports require the use of the APAPARM option. Only those jobs that create reports requiring the insertion of in-line resources must have a corresponding member in the APAPARM library.

In each member, there must be one line for each report produced (or group of reports if using masking for the report name) in the following format:
+++repname        (+++ starts in column 1)

Table 3 APAPARM Format

Parameter

Description

+++

Identification that the line is a report name line.

repname

This is the name of the report (maximum 20 characters). repname must be the same as the name of the report specified in the Report Decollating DO NAME parameter. repname can contain either the full report name, prefix of report name or a mask of report name or names. The report name or names mask may be composed of characters, asterisks (*) and question marks (?):

*—Any character, group of characters, or no character

?—A single character

Examples

Table 4 Masking Formats

Format

Description

ABC*

The report name must begin with ABC (that is, prefix).

*D

The report name must end with D (that is, suffix).

ABC*D

The report name must begin with prefix ABC and end with suffix D. Any characters may be present between the prefix and the suffix.

*

All report names are selected.

A?B1

The report name must begin with prefix A and end with suffix B1. Any one character may be present between the prefix and the suffix.

Following the +++repname line, one or more structured field records may follow.

Any number of +++repname lines can be present in one APAPARM member.

For example, consider the following report decollating mission parameters:

Copy
JOBNAME=xxxxxxxx
...       DO NAME=report-name1
...       DO NAME=report-name2

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

Copy
+++report-name1
printing characteristics-1
printing characteristics-2
+++report-name2
printing characteristics-1

Not every report requires special processing using the APAPARM option. The APAPARM library must only contain members for jobs that require in-line (in-stream) structured fields, and not for all jobs.

A sample member APAPARMS can be found in the APAPARM library.

When Control-D prints the reports named report-name1 and report-name2, the structured field or fields specified on the lines following the +++ lines are automatically added at the beginning of each report.

The structured field records, following the +++repname line, are in Hexadecimal (Hex) format. (If it is a library with RECFM set to F, then it must be preceded with the RDW, length in bytes.) Here is the structure of the Hex format:

Table 5 Hex Format of the AFP Structure Field

4 BYTES

1 BYTE

2 BYTES

3 BYTES

1 BYTE

2 BYTES

 

 

X’00400000

X’5A

length

SF identifier

flag

sequence number

data

padding

(ONLY FOR A LIBRARY WITH RECFM SET TO F)

The APAPARM option provides a simpler method of specifying some of the structured fields, in regular character format. Control-D automatically translates the character format to Hex format at time of printing. The following two special commands can also appear between the AFP structured field records:

Copy
IMM=xxxxxxxx    (up to eight characters)
IDM=yyyyyyyy    (up to eight characters)

xxxxxxxx represents the name of the specific Copy Group in the current FORMDEF and yyyyyyyy represents the Page Format in the current PAGEDEF.

When using this method, there is no need to specify the IMM and/or the IDM commands in Hex format.

For example, consider the following report decollating mission parameters:

Copy
JOBNAME = PRTAFP1...       DO NAME = UPDATE REPORT



   ...       DO NAME = SUMMARY REPORT

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

Copy
+++UPDATE REPORT
IMM=FORM1
IDM=UPDT
+++SUMMARY REPORT
IDM=SUMM

The Hex version could appear as follows (x‘ ’ is not part of the syntax):

Copy
+++UPDATE REPORTX
'5A0010D3ABCC000002C6D6D9D4F1404040'
X'5A0010D3ABCA000002E4D7C4E340404040'
+++SUMMARY REPORT
X'5A0010D3ABCA000002C6D6D9D4F1404040'

In this example, the UPDATE REPORT requires a special Copy Group and a special Page Format. The SUMMARY REPORT requires only a special Page Format. The SUMMARY REPORT uses the default Copy Group of the active FORMDEF while printing.

The APAPARM Option Flow

When printing bundles, Control-D checks which type of printer is being used. If the printer type is APA, Control-D searches in the APAPARM library for a member with the same name as the job name that produced the report that is currently going to be printed. If such a member does not exist, Control-D prints the report without any special APAPARM process. If such a member exists, Control-D searches in the member for a +++repname line that contains the name (or mask) of the report that is currently ready to be printed. If such a line does not exist, Control-D prints the report without any special APAPARM process. If such a line exists, Control-D inserts the structured fields that follow at the beginning of the report. If a new chunk is produced (that is, the report size is greater than the chunk size) while printing the report, Control-D automatically adds the structured fields at the beginning of the new chunk.

Figure 28 Diagram of the APAPARM Work Flow

If a new chunk is created when using the chunking mechanism, Control-D adds the structured field or fields at the beginning of each new chunk.

Figure 29 Diagram of the APAPARM Logic Flow

If a new chunk is created when using the chunking mechanism, Control-D adds the structured field or fields at the beginning of each new chunk.