The SORT statement, identified by the statement type SORT, is required. It allows the input accounting data to be sorted on up to five different fields. Each field, or sort level, is defined by the format pppllosd
is a three-digit number specifying the sort field's starting position. Refer to the IMS Interface Basic Accounting Table given later in this chapter.
is a two-digit number between 01 and 08 defining the length of the sort field in the Basic Accounting Table.
indicates the sort order:
A = ascending
D = descending
The default is A (ascending).
is the summary print option that tells the Wizard Report Writer whether or not you want a summary line printed for this level and is defined as follows:
no summary line is printed at this level.
single, double, or triple spacing before printing the summary line.
eject to a new page after printing the summary.
eject to a new page and reset page number to 1 after printing.
(If either E or P is specified for the first (major) summary level, grand totals print on a page by themselves.)
specifies whether a descriptive header appears at this level.
The creation of any user sort control field may be omitted. If no sort control field is specified, the accounting data is arranged in the following default order:
The maximum length of each user-defined sort control field is eight (8) characters. Sort field definitions of less than eight characters are padded with trailing blanks. In addition to a summary line at each of the five levels, the Wizard Report Writer automatically produces a final totals line at the conclusion of a report.
Print record flag fields allow you to specify which type of detail record will be printed: transaction or program. A 1 indicates print. A blank specifies that this type record should not be printed.
The required records indicator field specifies the type of records needed for a given report when no detail records are to be printed. For example, if you want a report to determine the degree of utilization of the various compilers at the summary level, sort on the program name of each program record. The presence of transaction records is detrimental as well as unnecessary to this report. In this example, to prevent the use of transaction records, and to specify that only program records are to be sorted for this report, an S is coded in the required records indicator field.
Each SORT statement must have a set code.
The following example illustrates a typical SORT statement:
First Second
Sort Level Sort Level
│ │
▼ ▼
┌─────────────────────┐
ASORT │ 04902AE1 │ 02903A21 │
└─────────────────────┘
Report A is sorted on two levels. The more general level is transaction type (begins at position 49 in the Basic Accounting Table), a two-character field, sorted in ascending order. Eject to new page after printing summary lines, and include descriptive headers.
The second sort level is transaction ID (positions 29 through 31 in the Basic Accounting Table), a three-digit field sorted in ascending order. Skip two lines before printing summary lines, and include descriptive headers.
The print ddname suffix field tells the Wizard Report Writer to use different print file DD statements for each report. When this position is nonblank, the character is appended to CAIJS and used as the ddname for the print file for this report. For example, CAIJS1 when the suffix character is a 1.
History Files
The history file ddname field specifies that you want to build an output file with the report. There are two kinds of history files:
The detail level history file is an archive or data base of all job accounting information (not just the information output on the report being created). It is created either at the transaction or transaction/program level and serves much the same purpose as the raw data, except that a detail level history file is already formatted and merged with data collected by other systems, and all calculations are already performed. A lot of time and resources are saved when the detail level history file rather than the raw data is used as input in subsequent executions.
The summary level history file creates an output file of summary line information. It is useful for creating subsequent, periodic, or year-to-date reports with little effort. The summary level history file can be created at any sort level from 1 to 5. Note that a level 3 summary file, for example, also contains information that may be summarized mathematically for sort levels 1 and 2.
The history level flag field set in the SORT statement defines the kind of history file you want created and at which level. A level 1-5 flag refers to the corresponding sort control level for a summary level history file. A level 6 or 7 flag indicates that detail level history data is to be created at the transaction (6) or the transaction/program (7) level.
| Copyright © 2012 CA. All rights reserved. |
|