Edit Parameters

Edit parameters define the output lines for a report. There are three types of edit parameters, as follows:
idmscu19
Edit parameters define the output lines for a report. There are three types of edit parameters, as follows:
  • 4
    or
    H
    (Optional) A type 4 edit parameter defines a header output line. Header output lines also result from auto-header specifications coded on type 5 or type 6 edit parameters.
  • 5
    or
    D
    A type 5 edit parameter defines a detail output line. At least one type 5 parameter is required for every report.
    A type 5 edit parameter also performs automatic totaling. Automatic totaling accumulates the values of all numeric fields specified on type 5 edit parameters. The totals are displayed on total lines at every control break and at the end of the output phase. Automatic totaling is performed if the OUTPUT parameter does not specify a details-only report and if type 6 edit parameters are not coded for the report.
  • 6
    or
    S
    (Optional). A type 6 edit parameter defines a total output line. Total lines are usually displayed at each control break and at the end of the output phase. Type 8 procedure logic can be used to control the output of total lines.
Each edit parameter describes the location and format of one output field.
This article describes the following information:
2
2
Location
Location is determined by the following items:
  • The type of edit parameter determines whether the output field appears on a header line, detail line, or total line.
  • The edit parameter line number specifies one of eight possible output lines for each type of edit parameter.
  • The edit parameter column number specifies the absolute or relative position the output field occupies on the output line. An absolute column number identifies the line position in which the output field begins printing. A relative column number identifies a relative column position on the output line.
Format
Format is determined by the following items:
  • Field size specifies the maximum number of columns that are reserved for the output field on the output line.
  • Decimal place specifies the number of digits that appear to the right of the decimal point in a numeric output field.
  • Specific format options specify editing formats for numeric output fields; for example, F$ edits the value 1234 as $1,234.
Syntax
      Col       2       ▼ ►►─── 
nn
 ──┬┬─ 4 ─┬┬─ 
line column spacing-code
 ───────────────────────────────►            │└─ H ─┘│            ├┬─ 5 ─┬┤            │└─ D ─┘│            └┬─ 6 ─┬┘             └─ S ─┘  ►─┬─ 
literal
 ───────────────┬─┬─────────────────┬─┬─────────────────────┬────►    ├─ 
field-name-expression
 ─┤ └ SZ = 
field-size
 ┘ └ DP = 
decimal-places
 ┘    ├─ PAGE ──────────────────┤    └─ DATE ──────────────────┘  ►─┬────────────────────────────┬─┬────────────────────────────────┬──────────►    └─ COLUMN = 
column-position
 ─┘ └─ 
format-code
 ─┬───────────────┬┘                                                   └─ '
edit-mask
' ─┘  ►─┬──────────────────────────┬───────────────────────────────────────────────►◄    ├─ HR ─────────────────────┤    ├─ HF ─────────────────────┤    │      ┌─────────────────┐ │    └─ HH ─▼─ '
auto-header
' ─┴─┘
Expansion of Field-name-expression
►►──── 
field-name
 ──┬─────────────────────────┬───────────────────────────────►◄                     ├─ .
subscript-value
 ──────┤                     └─ .
subscript-field-name
 ─┘
Syntax Rules
  • nn
    Identifies the report that is associated with the edit parameter.
    Nn
    must be a 2-digit number in the range 00 through 99 and must be coded starting in column 2.
  • 4
    Indicates that the edit parameter defines an output field on a
    header line
    ; alternatively, H (header) can be used to identify a header parameter.
    Must be coded in column 4.
    Report headers can be specified either on type 4 edit parameters or by using the auto-header capabilities of CA Culprit. Headers that are specified on type 4 edit parameters are printed above headers specified as auto-headers; auto-headers are discussed later in this section under syntax rules for HH, HR, and HF.
  • 5
    Indicates that the edit parameter defines an output field on a
    detail line
    ; alternatively, D (detail) can be used to identify a detail parameter.
    Must be coded in column 4.
  • 6
    Indicates that the edit parameter defines an output field on a
    total line
    ; alternatively, S (summary) can be used to identify a total parameter.
    Must be coded in column 4.
  • line
    Specifies an edit line. It must be a single digit in the range 1 through 8 and must be coded in column 5.
    The total of the number of lines that are specified for type 4 edit parameters and the number of auto-header literals that are coded on a type 5 or type 6 edit parameter must not exceed 8. If the total number of equals 8, type 4 edit parameters must specify
    line
    sequentially, starting with 1.
  • column
    Specifies the location of the output field on the output line.
    Column
    must be a 4-character value that is coded in columns 6 through 9.
    Column
    can specify either an absolute column position on the output line or a relative column position on the output line, as follows:
    • An
      absolute column position
      identifies the output line position in which the output field begins printing. The value ranges from 0 to
      n
      , where
      n
      is the output record size that is specified for the report. Leading zeros can be omitted from this specification; if leading zeros are omitted,
      column
      must be right-justified on column 9.
      Note:
      To specify a column beyond 9999, see COLUMN= later is this section.
    • A
      relative column position
      identifies the location of the output field on the output line relative to other output fields. Column 6 must contain an asterisk (*); columns 7 through 9 must contain a relative column number in the range 000 through 999. Leading zeros can be omitted from this specification; if leading zeros are omitted, the column number must be right-justified on column 9.
      The following rules apply to coding a relative column position:
      • All fields with the same relative column number align in a single column. The column width is set to the length of the longest field or literal that is defined on an edit parameter that is coded with that particular relative column number. CA Culprit spaces these columns evenly across the output record.
      • Relative column numbers do not have to be coded in a particular order. CA Culprit sorts the columns in ascending order from left to right across the output record.
      • Relative column numbers do not have to be sequential; for example, a three-column report can be coded as * 10, * 18, and * 21. With this feature, new columns of information can easily be added to a report.
      • Relative column numbers and absolute column numbers must not be combined in the same line definition; for example, all output fields on line number 1 of a type 5 edit parameter must be coded with either a relative or an absolute column position, but not with both. This rule does not apply when
        column
        equals 0 (either 0000 or *000).
    A column position of 0 can be specified for one or more numeric output fields that are coded on type 5 edit parameters. These fields are not output in the detail lines for the report. CA Culprit totals the values of the nonprinted fields; the field totals can be used during the output phase in type 8 process parameters and type 6 edit parameters.
    Output fields must not overlap on the output record, except for a trailing negative sign edit character. If the first character of an output field overlaps the negative sign that follows the previous output field, CA Culprit performs the following tasks:
    • On a type 4 header edit parameter, the first character of the overlapping field prints, unless it is a literal. If the second field is a literal, a blank space or the trailing negative sign prints instead of the first character of the literal.
    • On a type 5 or type 6 edit parameter, the first character of the overlapping field prints instead of the trailing negative sign.
  • spacing-code
    Specifies the number of lines that are skipped before the edit line is output.
    Spacing-code
    is a single character that must be coded in column 10. Valid space codes include any standard ASA character, as listed in the following table.
    If a single edit line definition contains more than one type of space code, spacing is determined by the value of the last nonblank code encountered (that is, the space code on the edit line definition that has the highest column number).
    When a space code of 1 appears on a type 5 or type 6 edit parameter, the associated detail or total line prints on a new page. Title and header lines do not print, unless this feature was requested at installation.
Spacing-code Value
Spacing Performed
Omitted
Single space
0
Double space
-
Triple space
1 through 9
Skip to channel 1 through 9
A,B,C
Skip to channel 10(A), 11(B), or 12(C)
+
No spacing (overprint on the same line)
V
Select card into pocket 1 (P1); applies to card output only
W
Select card into pocket 2 (P2); applies to card output only
  • literal
    /
    field-name-expression
    /PAGE/DATE
    Specifies an output field.
  • literal
    Specifies an alphanumeric or hexadecimal literal:
    • An
      alphanumeric literal
      is a 1- to 64-character string enclosed in single quotation marks; to express an apostrophe (a single quotation mark), code two consecutive single quotation marks; for example, 'ERNIE''S DINER'.
    • A
      hexadecimal literal
      is a 1- to 50-character (25-byte) hexadecimal string that is preceded by X and enclosed in single quotation marks; for example, X'00FF'.
  • field-name-expression
    Specifies an input field that is defined on a REC parameter or a work field that is defined on a work field parameter.
    See the expansion of
    field-name-expression
    that follows.
  • PAGE
    A reserved word that can appear only on type 4 edit or type 8 process parameters.
    When PAGE is coded on a type 4 edit parameter, The CA Culprit output is a 1- to 6-digit page number with leading zeros suppressed. As each new page begins, the value of PAGE increases by 1. Users can reset this value in type 8 procedure logic, as explained in Process Parameter.
    PAGE can be defined for only one output field in a report. Generally, it is used when no title parameter is coded for a report. If PAGE is coded for a report that includes a title parameter, the page number is not output on the title line.
  • DATE
    A reserved word that can appear only on type 4 edit parameters. When DATE is specified, an 8-character date is output in
    mm/dd/yy
    (American),
    dd/mm/yy
    (European), or
    yy/mm/dd
    (Canadian) format. The date format and the inclusion of the system time are governed by PROFILE parameter options DS= and TS=.
  • SZ =
    field-size
    Specifies the number of alphanumeric characters or digits that are printed in the output field. If this keyword expression is not specified on a type 4 or type 5 edit parameter, the default output size is determined by the field and data type, as indicated in :tref refid=outsize..
    If totals print automatically (that is, type 6 edit parameters are not coded for the report), the default output size is the size that is specified for the associated field on a type 5 edit parameter. If type 6 edit parameters are specified, the default output size is the size indicated in the table that follows.
    The following rules apply to
    field-size
    for numeric and alphanumeric fields:
    • For
      numeric fields
      ,
      field-size
      refers to the number of digits to be output. The output field size does not include editing characters, such as commas and decimal points. Editing characters must be considered, however, when planning output format.
      Field-size
      affects only the length of the field output; it does not affect the number of digits that are used in arithmetic calculations. When numeric fields are output, any necessary truncation or zero-filling occurs on the left.
      The following rules apply to the SZ= keyword expression in association with specific format codes; format codes are discussed later in this section:
      • Field-size
        must not be specified with format codes FU, FW, FD, and FM. The size of an output field that specifies one of these format codes follows:
          FU: 4 bytes      FW: 8 bytes      FD: 6 bytes      FM: user-defined             FP: Field size indicates the number of packed bytes output.      FB: Field size indicates the number of binary bytes output.              It must be a number in the range 1 through 4; the default                is 4.        FS: Field size should be specified as 9 bytes.  
      • Field-size
        can be specified for format codes FP, FB, and FS. The following rules apply:
    • For
      alphanumeric fields
      ,
      field-size
      refers to the number of characters to be output. The valid range is 1- to 32,760; the default is the actual size of the field. Alphanumeric values print from left to right; they are truncated on the right if the value is longer than the size specification.
Field
Data Type
Code
Default Size
Input
Alphanumeric
Omitted
Input size
 
Binary
1
Three times input size
 
Zoned decimal
2
Input size
 
Signed packed decimal
3
Two times input size minus 1
 
Unsigned packed decimal
4
Two times input size
 
Bit (data type is 5)
5
Three digits
Work
Alphanumeric
 
Work field size
 
Numeric with no decimal point specification and containing 15 digits or less
 
15 digits
 
Numeric with a decimal point specification or with an initial value containing more than 15 digits
 
31 digits
The size reflects only the number of digits; CA-Culprit makes no adjustments for edit characters in output size specifications.
  • DP =
    decimal-places
    Specifies the number of digits to the right of the decimal point in a numeric output field.
    Decimal-place
    must be in the range of 0 through 14. If DP=0 is specified, no decimal point or decimal positions are output.
    Consider the following rules when coding a DP= keyword expression on an edit parameter:
    • If DP =
      decimal-places
      is specified on a REC parameter or work field parameter, the DP= specification is usually omitted from the edit parameter.
    • If DP =
      decimal-places
      is specified on an edit parameter, the value of
      decimal-places
      replaces
      any explicit or implicit decimal point specification made when the field was originally defined. For example, if an input field defined with two decimal places is specified on an edit parameter with the keyword expression DP=3, the output field has three decimal places. This replacement applies only when the field is output and not to any arithmetic operations that are performed on the field.
    • If a decimal place is not specified on the parameter that defines the field or on the associated edit parameter,
      decimal-places
      defaults to 0 (zero).
    • If
      decimal-places
      is greater than 14 on the field definition, the field value is output without the decimal point because the maximum number of decimal positions that are allowed in an output field is 14.
    • DP =
      decimal-places
      cannot be specified on an edit parameter that specifies one of the following format codes: FU, FW, FB, FD, FM, FS, FZ, or FP. If the DP= keyword expression is specified with format code F
      n
      , the number of decimal places that are specified should be the same as or less than the value of
      n
      .
    Sample decimal specifications appear in the following table.
    Note:
    If the PROFILE parameter option RELEASE=5 is in effect, the default for
    decimal-places
    is 2 for all numeric fields unless a DP= keyword expression is specified on a REC, work field, or edit parameter for the field.
REC Parameter Specification DP=
Edit Parameter Specification DP=
Result
Not specified
Not specified
///123,456
0
Not specified
///123,456
Not specified
1
///12,345.6
3
Not specified
///123.456
3
2
//1,234.56
In this table, the field size equals 8 bytes. Blanks are shown as slashes (/)
  • COLUMN =
    column-position
    Specifies the absolute position of an output field beyond column position 9999.
    Column-position
    is an integer in the range of 10,000 through 32,760.
    The following coding rules apply:
    • When this keyword is used on type 5 and type 6 edit parameters, columns 6 through 9 on the edit parameters must be blank.
    • Values for the SZ= keyword expression in the range 1 through 32,760 are valid for alphanumeric fields.
    • JCL file definitions must be modified as follows:
      • Specify the size of the output record in the SYS020 file.
      • If necessary, increase the record length and block size on the SYS006 and SYS008 files to accommodate a record at least as large as the output record.
  • format-code edit-mask
    Specifies format options for numeric output fields, as follows:
    • Format-code
      is a 2-character code that identifies different format options. Possible values are listed under
      Valid Format Codes for Printed Output Fields
      and
      Valid Format Codes for Nonprinted Output Fields
      . Examples of printed output fields appear under
      Examples of Format Edit Specifications for Printed Output Fields
      .
      If
      format-code
      is not specified, leading zeros are suppressed and commas are inserted after every three digits, counting from right to left from the decimal point. If FU, FW, FB, FD, FM, FS, FZ, or FP is specified, the explicit or implicit decimal point that was specified when the field was originally defined is ignored. If FD, FM, or FS is specified on a type 5 edit parameter, the column total is not automatically output; If the field is also specified on a type 6 edit parameter, the column total is output.
Valid Format Codes for Printed Output Fields
Code
Editing Operation Performed
Omitted
Leading zeros are suppressed; commas are inserted.
F*
F* replaces leading zeros by asterisks except for decimal positions. The last digit is followed by an asterisk, unless the field value is negative. Commas are inserted. This format option is used primarily for check protection.
F0
F0 suppresses leading zeros and omits commas. If the value is negative, a trailing minus sign is output.
F
n
F
n
suppresses leading zeros except for the last
n
digits, where
n
is a number in the range 1 through 9. Commas are inserted. If the value is negative, a trailing minus sign is output. A specified minimum number of zeros is output when the value of this option is 0. If this format code is specified with a DP= keyword expression, the value of
n
should be equal to or greater than the number of decimal places.
F$
F$ suppresses leading zeros except for decimal positions or, if there are no decimal positions, the last digit. Commas are inserted. A floating dollar sign is inserted before the first number output. If the value is negative, a trailing minus sign is output.
FN
FN produces leading zeros and omits commas for the default length of the field. If the value is negative, a trailing minus sign is output. If specified, a decimal point is output.
FC
FC suppresses leading zeros except for decimal positions or, if no decimal positions are specified, the last digit. Commas are inserted. If the value is negative, it is enclosed in parentheses. The left parenthesis is output immediately before the first digit output.
F-
F- suppresses leading zeros except for decimal positions or, if no decimal positions are specified, the last digit. Commas are inserted. If the value is negative, a minus sign is output before the first digit output.
FF
FF suppresses leading zeros except for decimal positions or, if no decimal positions are specified, the last digit. Commas are omitted. If the value is negative, a minus sign is output before the first digit output.
FD
FD edits the field in date format:
mm/dd/yy
. The field size is assumed to be six digits. Keyword expressions SZ= and DP= are invalid on an edit parameter that specifies format code FD. The accumulated total of a field that specifies this format code on a type 5 edit parameter does not appear in a total line that is generated automatically.
FS
FS edits the field in social security number format:
nnn-nn-nnnn
. The field size is assumed to be nine digits. The keyword expression DP= is invalid on an edit parameter that specifies format code FS. The accumulated total of a field that specifies this format code on a type 5 edit parameter does not appear in a total line that is generated automatically.
FM
FM edits the field as specified by the associated user edit mask. A user-defined edit mask must follow. Keyword expressions SZ= and DP= are invalid on an edit parameter that specifies format code FM. The accumulated total of a field that specifies this format code on a type 5 edit parameter does not appear in a total line that is generated automatically.
FR
FR reverses the contents of an alphanumeric text string. This code is useful for languages that require the reader to read right to left.
Valid Format Codes for Nonprinted Output Fields
Code
Description of Editing
FB
FB converts an integer field value to binary output. The integer field value must be a number in the range -2,147,483,648 through 2,147,483,647. The output field size is 1 through 4 bytes; 4 bytes is the default. Any necessary truncation or zero-filling occurs on the left.
FU
FU converts a numeric field value to a single precision floating point value. The output field size is 4 bytes. Keyword expressions SZ= and DP= are invalid on an edit parameter that specifies format code FU. Format code FU is used primarily in scientific applications.
FW
FW converts a numeric field value to a double precision floating point value. The output field size is 8 bytes. Keyword expressions SZ= and DP= are invalid on an edit parameter that specifies format code FW. Format code FW is used primarily in scientific applications.
FP
FP converts the output field value into a signed packed decimal number. This format code should be specified for nonprinted output; when used with printed output, the results are unpredictable. The maximum field size with format code FP is 16 bytes.
FZ
FZ converts the output field value into a zoned decimal number. Negative values are output with an 11-zone punch over the last digit. This format code should be specified for nonprinted output; when used with printed output, but the sign punch either suppresses printing of the last digit (if it is 0) or prints the last digit as an alphabetic character.
Examples of Format Edit Specifications for Printed Output Fields
Format Edit Code
+123456
0
-6315
F*
***123,456*
***********
*****6,315-
F0
//123456
////////
////6315-
F2
///123,456
////////00
/////6,315-
FN
00123456
00000000
00006315-
F$
//$123,456
////////$0
////$6,315-
FC
///123,456
/////////0
////(6,315)
F-
///123,456
/////////0
////-6,315
FF
//123456
///////.0
///-6315
In this table, the field size equals 8 bytes. Blanks are shown as slashes (/).
  • edit-mask
    Describes the size and format for a numeric output field. It applies only to fields defined with format code FM.
    Edit-mask
    is a 1- to 64-character expression which is enclosed in single quotation marks. The expression describes the field size and format, the number of decimal places, and any characters to be inserted into the value.
    Selected alphanumeric characters have unique meanings when used in an edit mask; these characters are described as follows:
    • A
      digit indicator
      is represented by a
      9
      . A 9 is replaced, from right to left, with digits from the numeric field, including leading zeros. An edit mask can contain a maximum of 31 digit and zero-suppression indicators.
    • A
      zero-suppression indicator
      is represented by a
      Z
      . A Z is replaced, from right to left, with the corresponding digit, unless the digit is a leading zero. A Z replaces any zeros to the left of the first nonzero digit with blanks. An edit mask can contain a maximum of 31 digit and zero-suppression indicators.
      Note:
      A Z to the right of a decimal point indicator (.) or to the right of a digit indicator (9) is treated as an insertion character or negative value indicator. When used in this way, Z does not function as a zero-suppression indicator.
    • A
      decimal point indicator
      is represented by a period (.). A decimal point indicator places a decimal point in the position it occupies in the edit mask. All digits to the right of the decimal point are printed. The number of digit indicators to the right of the decimal point indicator should agree with the number of decimal positions that were specified when the field was originally defined.
    • Insertion characters
      specify any characters other than digit or decimal point indicators. Insertion characters are output in the output field in the position they occupy in the edit mask. Insertion characters are not output unless a digit from the field has already been output. More specifically, these characters do not print if all preceding digits were zero-suppressed and replaced on output by blanks, as a result.
      A Z is treated as an insertion character if it occupies a position in the edit mask to the left of the rightmost digit indicator (9) and to the right of at least one digit or decimal point indicator; for example, '9.Z99'. To express an apostrophe (a single quotation mark) in an edit mask, code two consecutive single quotation marks.
    • Negative value indicators
      specify a negative value. These indicators can be any character (including Z) or combination of characters that follows the rightmost digit indicator. Such characters print as they appear in the edit mask only if the output field has a negative value. There is no default negative value indicator if an edit mask is used.
    Each edit mask must begin with a digit indicator, a zero-suppression character, or a decimal point indicator; all other types of characters are optional. Sample edit masks are shown in the following table.
Indicator
User Mask
Field Value
Printed Result
Digit
'999' or 'ZZZ'
+123
123
 
'9999'
 
0123
 
'ZZZZ'
 
/123
 
'99' or 'ZZ'
 
23
 
'ZZZ99'
 
//123
 
'9999'
-123
0123
Decimal point
'9.99'
+123
1.23
 
'Z.999'
 
/.123
Insertion character
'99A99B99C'
+123
00A01B23
 
'99Z99'
 
01Z23
Negative value
'9.99-'
+123
1.23
 
 
-123
1.23-
 
'ZZ.99RZ'
+123
/1.23//
 
 
-123
/1.23RZ
  • HR/HF/HH
    auto-header
    Specifies the origin of automatically generated headers. If auto-headers are not specified, all headers that are printed are from user-coded type 4 edit parameters.
    An auto-header must not be coded on a type 6 edit parameter unless a totals-only report is defined. Headers can be defined on either a type 5 or type 6 edit parameter for a totals-only report, but not on both.An auto-header must not be coded on a type 4 edit parameter.
  • HR
    Indicates that the source of auto-headers is the REC parameter that defines the associated field. If HR is not specified, any auto-header literals that are defined on the REC parameter are ignored.
  • HF
    Indicates that the source of the auto-header is the name of the field or literal defined on the edit parameter. For example, if the field name is ACCTNO, this name is used as the header. If the field is subscripted, the base field name (that is, the field name without the subscript value) is used as the header. If
    literal
    is specified, the literal name acts as the header.
  • HH
    auto-header
    Indicates that an auto-header immediately follows HH on a type 5 or type 6 edit parameter.
    The following rules apply to coding
    auto-header
    :
    • Auto headers must follow all other specifications of the edit parameter, except for comments.
    • A maximum of eight auto-header alphanumeric literals can be specified on each edit parameter; each literal must be enclosed in quotation marks.
    • A maximum of 90 characters can be specified for the entire group of auto-header literals.
    • Each literal of an auto-header must appear entirely on one line.
    • To print an apostrophe (a single quotation mark) within a literal, specify two consecutive single quotation marks; for example, 'ERNIE''S'.
    Auto headers appear at the top of each report page, beneath the title line (if any), and beneath headers generated by type 4 edit parameters (if any). Each auto-header is centered over the field column. If the auto-header contains more than one literal, the literals are stacked vertically to form a multiline heading.
    Auto headers should be associated with a single edit line. If this is not possible, CA Culprit generates separate header lines for each edit line number with an associated header-origin code, starting with the lowest line number.
Examples
Sample edit parameters for header lines, detail lines, and total lines follow.
Example 1: Header Lines
01410040-'CURRENT BALANCE' 01410062 'DATE'
Header line 1 contains two output fields; both are literals. CURRENT BALANCE prints beginning in column number 40 and DATE prints beginning in column 62. The line is printed at the top of each new page after the title, if one is specified. Two blank lines separate the title from the header, as established by the space code - (hyphen).
An alternative way of coding the same header line appears as follows:
01H10040-'CURRENT BALANCE       DATE'
Example 2: Header Lines
3341*010     'BRANCH' 3342*010     BRANCH
Report 33 contains two header lines; the literal BRANCH prints in the relative column that is identified by 10; the branch name prints in the same relative column, directly under the literal. The field BRANCH must be specified on either a SORT parameter or in a HEAD instruction.
Example 3: Detail Lines
095100120 CUST-NAME            SZ=15 09520012  CUST-AMT-SALES       F$ 09520035  CUST-NUM-SALES       F1
The body of Report 09 contains a listing of customer names, the amount of sales, and the number of sale transactions. The customer's name prints for 15 spaces on the first detail line, starting in column number 12. A blank line is output before the name is output.
The amount of sales prints directly under the name, beginning in column 12. CUST-NUM-SALES prints on the same line as CUST-AMT-SALES, starting in column 60. The sizes of these two output fields are the default values determined by the definitions of the fields. Format codes are used to edit the printed output.
CA Culprit automatically totals and prints the totals of CUST-AMT-SALES and CUST-NUM-SALES. Printing can be suppressed either by coding type 6 edit parameters or by defining a details-only report on the OUTPUT parameter.
Example 4: Detail Lines
 23510000 COUNT  2351*010 CUST-NAME        SZ=15     HR  2351*030 CUST-AMT-SALES   FM '$ZZ,ZZ9.99CR' *                                    HH 'AMOUNT OF' 'SALES'  2351*020 CUST-NUM-SALES   FM 'ZZ9'  HH ' ','NUMBER OF','SALES'  2351*040 SALE-DATE        FD        HF
Four output fields are printed in relative column positions 010 through 040 on one detail line. The four columns are spaced evenly across the page in ascending order.
A column heading is specified for each output field. The auto-header for CUST-AMT-SALES, coded on a continuation line, contains two literals; therefore, a two-line header appears over relative column 2. A blank line automatically prints between the column headers and first detail line because fewer than eight auto-header lines are specified.
Edit masks are used in this example to format the printed output fields. Although CUST-AMT-SALES, CUST-NUM-SALES, and SALE-DATE are numeric fields, the column totals of these fields are not automatically printed because format codes FD and FM are specified. The output field COUNT is not printed on a detail line because the type 5 edit parameter specifies 0 for a column number. However, the accumulated value of COUNT is available for use during the output phase.
Example 5: Total Lines
2361*020  CUST-NUM-SALES   FM 'ZZZ9' 2361*030  CUST-AMT-SALES   FM '$ZZZ,ZZZ,ZZ9.99CR' 23620001  'TOTAL CUSTOMER VISITS' 23620023  COUNT  SZ=6  F1
These edit parameters define total lines for the previous example. Total lines are not automatically output because type 6 edit parameters are defined. Instead, the output of total lines can be controlled with type 8 procedure logic.
Edit masks are specified again for CUST-NUM-SALES and CUST-AMT-SALES. The size of the output fields is larger to accommodate total values.
Total line 1 is coded with relative column numbers and total line 2 with absolute column numbers. A literal prints starting in column 1 of the second total line. The total value of COUNT, accumulated as a nonprinted field on a type 5 edit parameter, prints starting in column 23 of the second total line.