Previous Topic

Next Topic

Book Contents

Book Index

CTTRPT Report Formatting Parameters

Figure 126 CTTRPT Report Formatting Parameters

REPORT NAME=GENERAL,TITLE='text',FOLD=YES|NO,
       PAGESIZE=p,LINESIZE=s,MARGINS=m-n,
       SUMMARY=YES|NO,OUTDD=ddname

FIELDS field 1/options-1,field 2/options-2,...,
       field n/options-n,ID=P|S

SORTBY field 1/options-1,field 2/options-2,...,
       field n/options-n

ATTR   FIELD=name,LENGTH=t,TITLE='text',EDIT='mask'

BREAK  FIELD=name,COLUMN=c,SUMTITLE='text',
       EDIT='numeric mask'

Table 356 CTTRPT Report Formatting Parameters

Parameter

Description

REPORT

Activates report formatting. The following subparameters can be specified:

  • NAME – Report name. Mandatory. The only valid value is GENERAL; general report of information extracted from the Media database.
  • TITLE – Report title. Optional. The maximum length is 64 characters. Default: ‘General Report’.
  • FOLD – Indicates whether all report data is printed in uppercase. Valid values are:

    - Yes – Print all report data in uppercase.

    - No – Print report data in upper and lowercase. Default.

  • PAGESIZE – Maximum lines in a page, where p is a numeric value between 21 and 16383. Optional. Default: 63.
  • LINESIZE – Maximum characters in a line, where s is a numeric value not greater than 255. Optional. Default: 127.
  • MARGINS=m-n – Lowest (m) and highest (n) columns in a line, where m is a numeric value greater than 0 and n is a numeric value greater than m but not greater than s (the value of LINESIZE). Optional. Defaults: m=1 and n=s.
  • SUMMARY=YES|NO – Indicates whether to show a summary line for each field break. Optional. Default: NO.
  • A field break occurs when there is a change in value for a field that is specified in a SORTBY statement with option /BRK, (or /B).
  • OUTDD–JCL DD name of the output. Default: REPOUT.

FIELDS

Output fields (meaning, fields required in the report) and the options that can be applied to each field. Mandatory.

The GENERAL report can contain volume and data set fields that can be specified as INCLUDE / EXCLUDE subparameters and special fields that cannot be specified as INCLUDE / EXCLUDE subparameters (described with their attributes later in this utility).

  • Options – Options can be added as a suffix to any output field in the list (optional for each field). The slash (/) preceding the option is required to distinguish the option from the field. Any number of options can be added to an output field. Available options are:

    - /Ln – Length of the output field. n must be a numeric value that does not exceed the length defined in the list of available fields. This option is used for Alphanumeric   and Hexadecimal fields only. Optional. This value, if specified, overrides a LENGTH value specified in the ATTR statement, described in this table.

    - /Cn – Column in which the field begins in the printed output. If specified for a field, it must be specified for all preceding fields. n must be a numeric value greater than the last column of the preceding field (determined by the preceding field’s beginning column and field length).

  • ID–P|S Output line indicator. This parameter designates an output line as a Primary Line (P) or Secondary Line (S). These values determine whether duplicate lines are printed from Volume and Dataset data. Optional.

    - P – Primary line indicator. The line is only printed when a primary key changes value.

    - S – Secondary line indicator. A line is printed for each record. Default.

SORTBY

Sort order of the output fields, described in FIELDS in this table. Optional.

Options – Options can be added as a suffix to any output field in the list (optional for each field). The slash (/) preceding the option is required to distinguish the option from the field. Any number of options can be added to an output field. Available options are:

  • /BRK or /B–Insert a page break in the report when the field changes its value. If specified for a field, it must be specified for all preceding fields.
  • /ASC – Sort the field in ascending order. Default.
  • /DSC – Sort the field in descending order.
  • /RSR – Reset the row number whenever the value of the   field changes. This option is effective only when field   ROWID is specified in the FIELDS statement
  • /RSP – Reset the row number whenever the value of the   field changes. This option automatically activates option   /RSR.

Note: Primary fields in a SORTBY statement must be specified before non-primary fields.

Example 1

SORTBY LOCATION /BRK (or /B) POOL/BRK/DSC,MEDIA/ASC

Output is sorted by vault (LOCATION) in ascending order (the default) by pool (POOL) within a vault in descending order and by media (MEDIA) within a pool in ascending order. A page break is inserted each time the vault or pool changes.

Example 2

SORTBY LOCATION /BRK/RSP,
MEDIA/BRK/RSR,EXPDT/DSC

Output is sorted by vault (LOCATION) in ascending order (the default) by media (MEDIA) within a vault in ascending order (by default) and by expiration date (EXPDT) within a media in descending order. A page break is inserted for every change in vault and media and the page number (and, by default, the row number) is also reset each time the vault changes. The row number is reset each time the media changes.

ATTR

Overrides default attributes defined for a field. Optional.

At least one optional parameter must be specified for statement ATTR.

An ATTR statement can be specified for any field, even a field not included in a FIELD statement. The report, however, is not effected by an ATTR for a field until the field is included in a FIELD statement. (This means that an ATTR statement can be defined in advance for each field, for use when the field appears in a FIELD statement.)

Member ATTRGEN in the Control-M/Tape PARM library contains sample ATTR statements for the GENERAL report.

The following parameters apply to the field whose attributes are changed:

  • FIELD – name Name of the field. Mandatory.
  • LENGTH – Length of the output field. Must be a numeric value that must not exceed the field length specified in the list of available fields. Optional. A /Ln value, if specified for the same field in the FIELDS statement, overrides this value.
  • TITLE – ‘text’ Field header. ‘text’ is any character string (enclosed in apostrophes). To split the header between lines, insert a slash (/) before each line break. The number of header lines in the report is determined by the field whose TITLE parameter text has the highest number of lines. Optional.

    For example, if the following is specified:
    ATTR FIELD VOLSER
    TITLE="Volume or Serial or Number"

    The header for field VOLSER spans three output lines as follows:
    Volume
    Serial
    Number

 

  • EDIT=‘mask’ – Field format, as specified through a mask. The mask must be enclosed in apostrophes. Parameter EDIT cannot be specified for character and hexadecimal fields. Valid mask formats:
    Numeric Format – For numeric fields only. The mask can consist of Z’s and 9’s and commas, where 9 represents any digit, Z represents a digit that is suppressed if its value is a leading zero and comma is a separator between digits.
    When specifying a numeric format, the following rules apply:

    - A 9 cannot precede a Z in the mask.

    - A comma cannot be the first or last character of the mask.

    Example
    Assume number 1234 is being edited (and b indicates blank)
    Mask Specified   Result
    ‘ZZ,ZZ9’               b1,234
    ‘Z,999’                 1,234
    ‘999999’              001234
    ‘ZZZ,ZZZ’            bb1,234

    Date Format
    For Date fields. Valid mask combinations can have no more than one day symbol, one month symbol and one year symbol.
    Valid symbols:
    – DD – Day (values 1 – 31).
    – MM – Month (values 1 – 12).
    – MMM – Month (values Jan – Dec).
    – YY – Year (last two digits, meaning, 00 – 99).
    – YYYY – 4-digit year (for example, 2000).
    Symbols can be optionally separated by one or more separation characters: ‘/’, ‘.’, ‘-’, blank, and so on.

    Example
    Assume the date being formatted is August 23, 2000.
    Mask Specified                  Result
    ‘DD/MM/YY’              23/08/00
    ‘YYYY.MM.DD’            2000.08.23
    ‘MM-DD-YYYY’            08-23-2000
    ‘DD MMM YYYY’         23 Aug 2000
    ‘MMM – DD – YYYY’   Aug – 23 – 2000
    ‘YY/MM’                          00/08

 

Boolean Format

For Boolean fields (meaning, fields that contain a True or False, or Yes or No condition). The specified FIELD is checked for a true or false condition in the record.

The mask can contain either one value or two values separated by a slash (/). A null value can be specified on either side of the slash.

When one mask value is specified, the value is printed in the report only if the FIELD checks "true" in the record. (If the FIELD checks "false", the mask value is not printed; blanks are printed instead.)

When two values are specified, the first value is printed in the report if the FIELD checks "true" in the record. The second value is printed if the field checks "false".

Examples

(1) ATTR FIELD=SCRATCH,
TITLE=‘Scratch’,EDIT=‘Yes or No’

(2) ATTR FIELD=ACTIVE,
TITLE=‘Type’,EDIT=‘Active or Scratch’

(3)ATTR FIELD=VAULTED, TITLE=‘V’,EDIT=‘v’

(4) ATTR FIELD=EDM, TITLE=‘Edm’,EDIT=‘/No’

The following table shows the results of Boolean editing for these examples:

Example

Field Tested

(1)

SCRATCH

(2)

ACTIVE

(3)

VAULTED

(4)

EDM

BREAK

Attributes of the summary line printed at the bottom of the page when a field break occurs. Optional.

For each field break, the user can specify a header and variables that indicate the number of primary and secondary lines printed and the value of the field before the break occurred.

At least one optional parameter of the BREAK statement must be specified.

A BREAK statement can be specified for any field, even a field that is not included in a SORTBY statement. The report, however, is not effected by a BREAK for a field until the field is included in a SORTBY statement with option /BRK and SUMMARY=YES has been specified in the REPORT statement.

This means that a BREAK statement can be defined in advance for each field when the field appears in a SORTBY statement and report summaries are included.

  • FIELD – name – Name of the field. Mandatory.
  • COLUMN – Column of the output line in which the summary title begins printing. column must be numeric. Optional. The default is the report start margin specified in parameter MARGINS of the REPORT statement.
  • SUMTITLE=‘text’ – Summary text to be printed when the   value of a field changes. text can be any string of characters. It must be enclosed in apostrophes and can contain one or more of the following variables:

    - %FIELD – Value of the field before the break occurred.

    - %COUNTP – Number of primary lines printed before the break occurred.

    - %COUNT – Number of secondary lines printed before the break occurred.

The default value of SUMTITLE ‘text’ is:

TOTAL IN %FIELD IS %COUNT

Note: If parameter ID is not specified in the FIELDS statement or there is only one FIELDS statement, the value of %COUNT is equal to the value of %COUNTP.

 

EDIT=‘numeric mask’ – Numeric format of %COUNT and %COUNTP variables. Optional. The default is ‘ZZ,ZZ9’. For more information, see the Numeric format example for the EDIT parameter of the ATTR statement, described in this table.

Example
REPORT NAME=DISTRIB,SUMMARY=YES
FIELDS ...
SORTBY
TOLOC/BRK/RSR/RSP,
FROMLOC/BRK (or /B)
TOSLOT,FROMSLOT,
VOLSER
BREAK
FIELD=TOLOC,
SUMTITLE=‘Total Volumes Moved To %FIELD is %COUNT’, EDIT=‘Z,ZZ9’
BREAK
FIELD=FROMLOC,
SUMTITLE=‘Total Volumes Moved From %FIELD is %COUNT’, EDIT=‘Z,ZZ9’
ATTR ...

Parent Topic

CTTRPT Parameters