The FIELD command or equivalent PF key displays the following Dataview Field Definition fill‑in for the current dataview definition. The Dataview Field Definition fill‑in names and describes the fields in the dataview.
=> => => -------------------------------------------------------------------------------- IDEAL: DVW FIELD DEFINITION DVW EMPMASTER (001) TEST SYS: DOC FILL‑IN Command Level Field Name T I Ch/Dg Occur Value/Comments/Clauses ‑‑‑‑‑‑ ‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑ ‑ ‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ====== ===== ======= TOP === = = ===== ===== ================================= ...... ...... ...... ====== ===== ===== BOTTOM == = = ===== ===== =================================
The fields on the Dataview Field Definition fill‑in are as follows:
Enter any line commands in this area. For a description of line commands, see the Command Reference Guide.
Enter the number from 2 to 16 that identify the hierarchical rank of the field. Since the dataview is treated as the level‑1 item, field levels start with level 2. 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.
Enter one of the following:
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 name of an elementary field must be unique in the dataview.
Note: The depth of subscripting specified must correspond to the depth of the subscripted field. For example, a three‑level table must have three subscript entries (n,o,p) to fully identify the occurrence.
Enter one of the following field types:
Note: The type defaults to N if the internal representation is specified but no Type is specified. The type must be blank for a group field.
The Programming Reference Guide contains a detailed explanation of each field type and its characteristics.
Enter one of the following to indicate the 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.
Enter the length, in characters or digits, of the field value:
You must enter a value in the Ch/Dg column for all elementary field types except dates and flags. 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 table, 42 in the Ch/Dg column for the first field (Type X), indicates a length of 42 characters. For the next field (Type N), the 7 in the Ch/Dg column indicates a seven‑digit field with seven integer positions; and for the third field (also Type N), the 10.3 in the Ch/Dg column indicates a 13‑digit field with ten integer positions and three decimal places. The last field (Type D), with a 5 in the Ch/Dg column, 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
If a field or group occurs multiple times, enter the number of times the field or group occurs. If there is a DEP ON clause in the Value/Comments/Clauses column, enter the maximum number of times the field can occur. The field named in the DEP ON clause indicates the exact number of times the field occurs for this record.
Depending on the circumstances, specify one of the following:
Note: CA Ideal retains or adjusts the case of the data entered in this column depending on the setting for case (determined either with a SET EDIT CASE command or by default).
Default initial value assigned to a field. The specified value is inserted when a record is created using this dataview and no value is provided for this field. Statements in the scope of the FOR NEW construct can overwrite the default initial value.
An elementary field can be assigned a value 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. You can also continue Field Names. Two or more alphanumeric literals continued in this fashion are concatenated and treated as one.
If a value is not entered in the Value/Comments/ Clauses column, the default value for a numeric field is zero and for an alphanumeric field, spaces.
In an occurring field, the Value column is left blank on the line that contains the field name for the parent field and the following lines in the Value column can contain entries for the value of each occurrence of the field. These values are identified by a valid subscript number (of the form (n), (n,o), or (n,o,p)) on the corresponding line in the Field Name column.
You cannot specify initial values for group fields.
You cannot assign an initial value for 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.
Provide 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 Field name column can contain the continuation of the field name.
The 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 original item. For an RRDS file dataview, if a redefined field has a shorter length than the original field, the record is padded with binary zeros since RRDS files must have fixed‑length records.
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 original item. For more information about alpha and non‑alpha group fields, see the Programming Reference Guide.
An item 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 item can have an initial value.) An OCCURs clause and a REDEFines clause cannot be on the same level‑2 field for a VSAM dataview.
To define a variable‑segment record, define the varying segments as level‑2 group fields. For each varying segment after the first, use the REDEFINITION keyword on the level‑2 group field that names the segment to indicate that the group field redefines the first variable segment. For variable‑segment records, there must be no level‑2 fields after the last redefined field.
If there are redefined fields at the end of a dataview but those redefinitions do not change the record length, the file is not a variable‑segment file, and the $REC‑SEGMENT function cannot change the record length.
A DEPENDING ON (DEP ON) clause in this column indicates that the field (elementary or group) repeats a variable number of times. The repeating field must be the last field at that level in the record. The field specified in the DEPENDING ON clause indicates the number of times the field named in the Field name column occurs in the current record. The DEPENDING ON field must be a non‑repeating, elementary, numeric field that appears previously in the dataview and contains an integer value.
Note: An RRDS dataview cannot include variable‑occurrence records.
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 EMPMASTER (001) TEST SYS: DOC FILL‑IN Command Level Field Name T I Ch/Dg Occur Value/Comments/Clauses ‑‑‑‑‑‑ ‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑ ‑ ‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ====== ===== ======= TOP ======= = = ===== ===== ============================= 000100 2 NAME 000200 3 LAST‑NAME X 20 000300 3 FIRST‑NAME X 15 000400 3 MID‑INIT X 1 000500 2 EMP‑ID N Z 7 000600 2 ADDRESS 000700 3 STREET X 20 000800 3 CITY X 15 000900 3 STATE X 2 001000 3 ZIP‑CODE X 9 001100 3 ALT‑ZIP N Z 9 REDEF 001200 2 MARITAL‑STATUS X 1 001300 MARRIED C 'M' 001400 SINGLE C 'S' 001500 DIVORCED C 'D' 001600 WIDOWED C 'W' 001700 SEPARATED C 'E' 001800 2 DEPENDENTS 001900 3 NUM‑DEP N Z 2 :NUMBER OF DEPENDENTS 002000 3 DEP‑DATA 12 DEP ON NUM‑DEP 002100 4 DEP‑NAME 002200 5 GIVEN X 12 :DEPENDENT'S FIRST NAME 002300 5 MIDDLE X 1 : MIDDLE INITIAL 002400 5 LAST X 20 : LAST NAME 002500 :IF DIFFERENT FROM EMPLOYEE 002600 4 BIRTH‑DATE D Z 8 002700 4 SEX X 1 ====== ===== ===== BOTTOM ====== = = ===== ===== =============================
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|