Generating Detail Code in Report Files

You can generate the $DETAIL area in a report file (ProgramCode.rpt) using bldrpt or cnvrpt. This allows lashow to use key number values on the report to access Drill Around definitions. There are three methods for generating $DETAIL sections in report files:

The $DETAIL area immediately follows the $FIELD area for each $GROUP. The $DETAIL area includes the field name and key number for fields listed in the $FIELDS area that have key numbers defined. If no fields with key numbers are found, only the $DETAIL, headers, and $ENDDTL are written.

The key number search is first done on the full field name from the $FIELDS area. If no key number is found, a check for a three-character prefix is performed on the name. If there is a three-character prefix, it is dropped and the remaining name is used to search for the key number. An example of a generated $DETAIL area (between the $ENDFLDS and $ENDGRP commands) is shown below.

$ENDFLDS

$DETAIL
*Name                  KeyNbr  Token  PFC DFC  Special Key Numbers
*--------------------   ---    ------  -   -   --------------------
 EMP-COMPANY            001
 COM-NAME               003
$ENDDTL

$ENDGRP

Running bldrpt with the -d option builds a new report file and generates a ProgramCode .rpt file with $DETAIL areas.

Note: This is not the default and cannot be sent by bldpgm.

To generate $DETAIL areas in new report files

  1. At the command line, type

    bldrpt [-dnmPDV] productline systemcode ProgramCode

    Field Description
    Program Options

    d - Add $DETAIL areas to $GROUPS that do not already have a $DETAIL area defined. This preserves any hand-coded $DETAIL areas.

    n - Do not add phrase delimiters. No existing phrase delimiters are deleted; the language processing is skipped entirely.

    m - The first character on all words is capitalized.

    P - Always print the $PGBRK parameter in the first group.

    D - Turn on the duplicate field number

    prefix (D).

    V - Display bldrpt version number.

    Product Line The product line of the report you want to build.
    System Code The system code of the report you want to build.
    Program Code The program code of the report you want to build.
    I/O Options Optional. Lets you redirect output to the screen or to a file.

    You will see a message that includes "(Key Numbers)" at the end to indicate that the $DETAIL section is being added.

    Building . . . (Key Numbers)

  2. Generate the report, using the following syntax:

    Command syntax: rptgen -t productline systemcode programcode