Purpose
Sends output to tables.
Syntax
Syntax for edit parameters is shown below:
Col 2 ▼ ►►─── nn ──┬┬─ 5 ─┬┬─ line column spacing-code ───────────────────────────────► │└─ D ─┘│ └┬─ 6 ─┬┘ └─ S ─┘ ►─┬─ literal ───────────────┬─┬─────────────────┬─┬─────────────────────┬────► └─ field-name-expression ─┘ └ SZ = field-size ┘ └ DP = decimal-places ┘ ►─┬────────────────────────────┬─┬─────────────────┬─────────────────────────► └─ COLUMN = column-position ─┘ └─ IX = ─┬─ A ─┬─┘ └─ D ─┘ ►─┬─────────────────────────────────┬────────────────────────────────────────►◄ └─ format-code ─┬───────────────┬─┘ └─ 'edit-mask' ─┘
Syntax Rules
Specifies an edit parameter that defines an output field on a detail or total line, respectively. The following coding considerations apply:
Specifies an edit line; for output to a table, line must have a value of 1.
Specifies the location of the output field on the output line as either an absolute or a relative column position. When tables are created, the type 5 and type 6 edit parameters should specify relative columns (specified as *nnn) because tables must have contiguous fields.
Specifies an output field on an edit parameter. When the OUTPUT parameter specifies CREATE, CA Culprit uses the name of each field as a column heading. For example, if the field name is EMP-ID, CA Culprit automatically creates a column heading that specifies this field name.
For expanded syntax for field-name-expression, see Edit Parameters — Overview.
Specifies the length of the output field:
The default is the length defined for the field.
This is a keyword expression that establishes an ascending (A) or descending (D) index for a column in the table. An index arranges the rows of a table according to the values of the indexed column. Information from an indexed table can be accessed and retrieved more efficiently than from a nonindexed table.
The IX= keyword expression can be used only if the OUTPUT parameter specifies CREATE. Only one column can be indexed per table. Noncontiguous keys cannot be concatenated.
Specifies format options for numeric output. Edit-mask describes the size and format of an output field that specifies format code FM. For more information about this format code, see Edit Parameters.
The format codes listed in the following table store the data as numeric. Format codes other than the ones listed in the following table store the data as text with embedded edit characters; for example, F$ stores the numeric value 1234 as the text value $1,234. The length Culprit assigns to the table field includes the edit characters.
|
Format Code |
Size in Bytes |
Data Type |
|---|---|---|
|
None |
1-32,760 |
Alphanumeric |
|
FP |
1-16 |
Packed signed decimal |
|
FZ |
1-31 (1-18 for ASF) |
Zoned decimal |
|
FB |
2 or 4 |
Binary |
|
FU |
4 |
Floating point - single precision |
|
FW |
8 |
Floating point - double precision |
Examples
Sample edit parameters for detail and total lines are shown and described below.
Example 1
01OUTPUT D TABLE=TABLE1 TYPE=CREATE USER=LHN PW=WALNUT * CATALOG=ASFDICT 0151*010 EMP-NAME SZ=25 IX=A 0151*020 SALARY SZ=10 F$ DP=2
The edit parameters for Report 01 define two columns of information. The first column has EMP-NAME as the column heading and lists employee names. CA Culprit indexes this column in ascending alphabetic order by the value of EMP-NAME. The second column has SALARY as the column heading and lists the salaries associated with each employee. Because the SALARY field specifies format code F$, CA Culprit stores the values as text with a floating dollar sign and decimal point; arithmetic operations cannot be performed on the values.
Example 2
01OUTPUT D TABLE=TABLE1 TYPE=ADD USER=DAV PW=PEANUT * CATALOG=ASFDICT 0151*010 NAME SZ=25 0151*020 SALARY SZ=10 F$ DP=2
This example is similar to Example 1, except that the OUTPUT parameter specifies ADD. The order, field size, and formats for the output fields are the same as those specified in Example 1. However, the field name in relative column *010 specifies NAME rather than EMP-NAME. CA Culprit can still verify this field because it compares the field size and data type of each type 5 edit parameter, starting with the lowest column position, to each table column definition. It does not compare the column names.
Example 3
01OUTPUT TABLE=TABLE1 TYPE=DELETE USER=JFD PW=ACORN * CATALOG=ASFDICT 0151*010 ' '
Since the OUTPUT parameter specifies DELETE, Report 01 specifies a dummy type 5 edit parameter to satisfy Culprit's coding requirements.
Example 4
DATABASE DICTNAME=TSTDICT INPUT DB SS=EMPSS01,EMPSCHM,100 REC DEPT-ID(DEPARTMENT) 1 4 2 REC SALARY(EMPOSITION) 15 5 3 PATHAA DEPARTMENT EMPLOYEE EMPOSITION 01OUT T TABLE='DEPARTMENT SALARIES' TYPE=CREATE USER=DOC1 PW=DOC1 * CATALOG=ASFDICT ONLINE=YES COMMENT='CREATED 2/18/87' 01SORT DEPT-ID + 0151*020 SALARY 0161*010 DEPT-ID FN 0161*020 SALARY FP
In this example of a totals-only report, type 6 edit parameters define the columns for table DEPARTMENT SALARIES and provide the column names. Each total line will contain the following information:
|
Copyright © 2014 CA.
All rights reserved.
|
|