The FIELD command or equivalent PF key displays the dataview field definition fill‑in for the current sequential file dataview definition. The dataview field definition fill‑in, shown in the following screen, names and describes the fields in the dataview.
=> => => -------------------------------------------------------------------------------- IDEAL: DVW FIELD DEFINITION DVW TEST‑DOC (001) SYS: DOC FILL‑IN Command Level Field Name T I Ch/Dg Occur Value/Comments/Clauses ‑‑‑‑‑‑ ‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑ ‑ ‑‑‑‑‑ ‑‑‑‑‑ ====== ===== ======= TOP === = = ===== ===== ================================= ...... ...... ====== ===== ===== BOTTOM == = = ===== ===== =================================
The entries on the dataview field definition fill‑in are as follows:
Specifies the area where you can specify line commands. For more information about description of line commands, see the Command Reference Guide.
Specifies the number that hierarchically ranks fields. Levels start with level 2. (The dataview is treated as a level‑1 item.) Level‑2 elementary fields (fields with no subordinate fields) do not require a level number. If no level number is supplied, the level number defaults to 2.
Field Name column must contain one of the following:
An elementary field is a field that has no subordinate fields. The field name of an elementary field must be unique in the dataview. Elementary fields are further defined by values entered in the T and Ch/Dg field. A group field has subordinate fields. Group field name entries have no T and Ch/Dg values.
You can continue the field name on a second line by including a semicolon (;) as the last character on the first line. You can break the field name at any character. You can specify the level number and the attributes T, I, Ch/Dg, and Occur on the first line only.
The field types are as follows:
Note: Type defaults to N if you specify the internal representation. Type must be blank for a group item. A detailed explanation of each field type and its characteristics is provided in the Programming Reference Guide.
Variable length fields are not supported for sequential files.
Non‑date entry with no type or length information is assumed to be a group name and must have subordinate fields following it.
Internal representation of numeric (signed and unsigned) and date type fields:
Note: Internal representation must be blank unless the type is N, U, or D. P is the default.
The length of the field value:
You must specify the characters and digits for all elementary field types except dates and flags. The default for date fields is 7. The minimum length for date fields is 5. For numeric and date fields, the maximum is 31 for packed and zoned and 9 for binary.
A non‑date entry with no type or length information is assumed to be a group name and must have subordinate fields following it.
In the following illustration, 42 in the Characters/Digits column for the first alphanumeric field (Type X) indicate a length of 42 characters. A numeric field (Type N) with 7 specified in the Characters/Digits column indicates a seven‑digit field with seven integer positions. The next numeric field, with 10.3 specified in the Characters/Digits column, indicates a 13‑digit field with ten integer positions and three decimal places. A date field (Type D) with five characters/digits can hold an internal 5‑integer date value of up to 273 years from the base year.
|
Type |
CH/DG |
|
X |
42 |
|
N |
7 |
|
N |
10.3 |
|
D |
5 |
Specifies the number of times a group or field occurs. You can specify initial values for the individual occurrences of an occurring field by entering the values on each successive line following the occurring field definition. A valid subscript number (of the form (n), (n,o), or (n,o,p)) is entered on the corresponding line in the Field Name column.
You cannot specify initial values for repeating groups.
Depending on the circumstances, this column specifies a value for the occurrence of the field or a REDEFINITION keyword. You can specify a descriptive comment about the field alone or with any of the others.
Note: The case of the data entered in this column as CA Ideal retains it depends on the setting that was determined for case either by default or with a SET EDIT CASE command.
Specific value assigned to an occurrence of a field.
You can assign a value to an elementary field in the Value/Comments/Clauses column. This value can be a numeric or alphanumeric literal, depending on the type of the elementary field.
You must enclose alphanumeric literals in delimiters (“or “). If an alphanumeric literal is longer than the space provided, continue the alphanumeric literal on the next line of the same column surrounded by a new pair of delimiters. Leave all other columns on the continuation line blank. Two or more delimited alphanumeric literals continued in this fashion are concatenated and treated as one. Be sure to include any required spaces in the delimiters, since spaces are not added when the values are concatenated.
The default value for a numeric field is zero. The default for an alphanumeric field is spaces.
In the case of an occurring field, the Value column is left blank on the line that contains the field name for the parent field. The following lines in the Value column can contain entries for the value of each occurrence of the field.
You cannot assign an initial value to a date field. (The default initial value is 0.) This also means that you cannot define a date field with subordinate condition names or flags. However, a date field can redefine a numeric field with an initial value.
Useful information about the field. A comment is indicated in this column by a preceding colon (:). To continue a comment over multiple lines, start each line of the column with a colon. The other columns can be blank or the continuation of a field name.
Keyword REDEFINITION (or REDEF) in this column indicates that this item is another view of the closest previously defined item at the same level that is not itself a redefinition.
This item cannot be larger than the item it redefines. The two items can be different types (such as alphanumeric and numeric).
If a field with a REDEF is a subordinate field, its Type does not affect whether the group is alpha or non‑alpha. CA Ideal uses the Type of the redefined (original) item. For more information about alpha and non‑alpha group fields, see the Command Reference Guide.
A field with a REDEF cannot have an initial value. If a group has a REDEF, none of its subordinate fields can have initial values. (However, the original field can have an initial value.)
The following example illustrates the various types of data structures that you can define using the dataview field fill‑in.
=> => => -------------------------------------------------------------------------------- IDEAL: DVW FIELD DEFINITION DVW TRANS‑FILE (001) SYS: DOC FILL‑IN Command Level Field Name T I Ch/Dg Occur Value/Comments/Clauses ‑‑‑‑‑‑ ‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑ ‑ ‑‑‑‑‑ ‑‑‑‑‑ --------------------------------- ====== ===== ======= TOP === = = ===== ===== ================================= 000006 2 REC‑TYPE X 2 000007 2 DATA X 98 000008 2 CUST‑ADDR REDEF 000009 3 CA‑CUST‑ID X 5 000010 3 CA‑NAME X 30 000011 3 CA‑ADDRESS X 30 000012 3 CA‑STATE X 2 000013 3 CA‑ZIP N Z 9 000014 3 CA‑CITY X 15 000015 2 ORD‑INFO REDEF 000016 3 OI‑ORD‑ID X 5 000017 3 OI‑CUST‑ID X 5 000018 3 OI‑ORD‑DT X 10 000019 3 OI‑DISC‑PCT N P 2.1 000020 3 OI‑STAT X 1 000021 3 OI‑SHIP‑DT X 10 000022 3 OI‑TERMS X 15 000023 3 OI‑CUST‑PO X 10 000024 3 OI‑SHIP‑ID X 5 000025 3 OI‑ORDER‑TOTAL N P 7.2 000026 3 OI‑FRT‑AMT N P 7.2 ====== ===== ===== BOTTOM == = = ===== ===== =================================
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|