Previous Topic: SyntaxNext Topic: Usage


Parameters

level-number

Indicates the level within the record to be occupied by the element. The level number must be an unsigned integer in the range 02 through 49, or 88. Level 88 applies to records used with CA ADS or COBOL only. Note that the highest level (01) in any record description is assigned by CA IDMS/DB to the record itself. The COBOL and PL/I DML precompilers can be directed to change the level numbers when the record is copied into a program (see the language-specific CA IDMS DML reference).

element-name

Identifies the element to be added to the record description. Element-name must be a 1- to 32-character name. The first character must be A through Z (alphabetic), digit (0 through 9), #, $, or @ (international symbols). The hyphen can also be used except as the first or last character, or following another hyphen. Element-name must not be the same as the schema name or the name of any other component (including synonyms) within the schema, with the following exceptions:

REDefines base-element-name

Specifies an alternative description for a previously defined place within the record structure. At runtime, when a program's storage is allocated, the redefining element description will not be allocated new storage space but will, instead, be assigned the same storage as base-element-name. Base-element-name must be the name of a preceding element of the same level within the record structure. When used, the REDEFINES clause must adhere to the following rules:

PICture is picture

Describes an element by depicting the element's length and data type. PICTURE is not valid for level-88 elements or for elements whose usage is COMPUTATIONAL-1, COMPUTATIONAL-2, or POINTER; For other types of elements, specify picture as a 1- to 30-character value that includes only those characters specific to the element's data type. The schema compiler's PICTURE specifications are similar to those for COBOL. See the "Usage" topic for a description of PICTURE specifications for valid data types.

VALue is/VALues are

Assigns an initial value or a list of values to an element description in the application program's main storage at program runtime, or it assigns a conditional value or a list of conditional values to a COBOL condition name (level-88 element). All level-88 element descriptions must include the VALUE clause. Enclose listed values in parentheses.

The VALUE clause has no effect on the database directly; the DBA is encouraged not to include initial-value in the data descriptions except as background or null values for use in main storage.

The VALUE clause is prohibited for the following:

ALL

Instructs CA IDMS/DB to fill the element description with repetitions of initial-value. For example, PIC X(5) VALUE ALL '*' is the same as PIC X(5) VALUE '*****'.

initial-value

Specifies the initial value assigned to the element at runtime as follows:

condition-value

Assigns a conditional value to a COBOL condition name (level-88 element). Coding rules specified for initial-value above also apply to condition-value. Condition-value must conform to the picture for the element that occupies storage.

THRu condition-value

Specifies a range of valid condition values for COBOL condition names (level 88). When THRU is used, the first condition-value assigns the first of a range of values that the condition name will represent at runtime; the second condition-value assigns the ending value of the range. To list values or ranges of values, enclose the list in parentheses.

USAge is

Specifies the storage format of data elements. USAGE defaults to CONDITION-NAME for level-88 elements and to DISPLAY for all others.

BIT

Values are stored as bits containing 0s or 1s. Bit elements must always be described in multiples of 8. (CA IDMS/DB does not provide slack bits.) The multiples of 8, however, can range over adjacent elements. For example, five bits can be described in one element and three in the next.

COMPUTATIONAL/COMp/BINary

Numeric values are stored in binary format with the following space requirements:

COMPUTATIONAL-1/COMP-1/SHOrt-point

Numeric values are stored in internal floating point (short precision) format, requiring 4 bytes. Do not code a PICTURE clause with this usage.

Note: VS2 COBOL does not support COMPUTATIONAL-1.

COMPUTATIONAL-2/COMP-2/LONg-point

Numeric values are stored in internal floating point (long precision) format, requiring 8 bytes. Do not code a PICTURE clause with this usage.

Note: VS2 COBOL does not support COMPUTATIONAL-2.

COMPUTATIONAL-3/COMP-3/PACked

Numeric values are stored in packed decimal format, requiring a half byte for each decimal digit plus a half byte for a sign, rounded up to the next full byte.

CONdition-name

The element does not occupy storage. CONDITION-NAME is assumed if level 88 is specified for the element. Note that CONDITION-NAME can be used in CA ADS dialogs and COBOL programs only. Do not code a PICTURE clause with this usage.

DISplay

Values are stored 1 character to a byte, according to EBCDIC conventions.

DISplay-1

One character occupies 2 bytes. DISPLAY-1 must be specified for double-byte character string (DBCS) data items.

POInter

Values are stored as fullwords. POINTER is used for elements that are to be used as address constants. Do not code a PICTURE clause with this usage.

SYNChronized

Documents the following alignments for usages of COMP, COMP-1, and COMP-2:

The SYNCHRONIZED specification does not force alignment, but rather documents user-imposed alignment. If synchronized is specified, filler elements must be used to align numeric data according to the above rules.

OCCurs occurrence-count times

Specifies the number of times that the element is to be repeated. Occurrence-count must be an unsigned integer in the range 1 through 32,767. Individual occurrences of the element are referenced in application programs by placing a subscript after the element name.

Observe the following rules when using the OCCURS clause:

occurrence-count times DEPending on control-element-name

Defines a control element within the record that determines the actual number of times the COBOL element will occur.

Occurrence-count must be an integer in the range 1 through 32,767. Control-element-name must identify an elementary data element that precedes the element being defined in the record. It must be defined as a signed computational element with a picture in the range S9 through S9(9) or 9 through 9(9). Runtime values of control-element-name must be in the range 0 through 32,767 (but not exceeding occurrence-count).

Individual OCCURS DEPENDING ON elements are referenced in the same fashion as individual OCCURS elements. Observe the same rules as for the OCCURS clause with the following additions:

0 to occurrence-count times DEPending on control-element-name

Indicates that the multiply-occurring group occurs from 0 to occurrence-count times depending on the value of the control-element. Rules for occurrence-count and control-element-name appear above.

JUStify RIGht

Specifies that when the element's runtime value is not as long as the element's picture allows, the value will occupy the rightmost positions of the element. JUSTIFY RIGHT is valid for alphanumeric or alphabetic elements only (group item or one whose PICTURE is specified with Xs or As).

BLAnk when ZERo

Specifies that when the element's runtime value is zero, the value will be changed to spaces.

SIGn is LEAding

Specifies that the sign of a numeric field is to appear in the leading position. This clause is valid for numeric display elements only.

SIGn is TRAiling

Specifies that the sign of a numeric field is to appear in the trailing position. This clause is valid for numeric display elements only.

SEParate character

Causes the sign of a numeric field to appear as a separate byte. This clause is valid for numeric display elements only.

element-synonym-specification

Associates a synonym (alternative name) with the element specified in the ELEMENT substatement. These synonyms are language dependent: each DML precompiler will automatically include the synonym associated with the compiler-specific programming language.

language

Specifies the host language with which the synonym will be used. Valid values are any languages associated with the record's synonyms.

synonym-name

Specifies the name of the synonym to be associated with the primary element name; it must be specified according to the rules for the host language with which the synonym is being used and must follow the rules specified above for element names.

INDexed BY index-name

Defines an index to be used at runtime for a multiply-occurring element (that is, one whose definition contains an OCCURS or OCCURS DEPENDING ON clause). This index is used in COBOL SET and SEARCH operations, and is therefore used as a subscript when accessing the associated OCCURS or OCCURS DEPENDING ON element.

Index-name must be a 1- to 30-character name; the characters can be A through Z (at least one), 0 through 9, or the hyphen (except as the first or last character or following another hyphen). It cannot duplicate any element named in the schema. Index-name is implicitly defined as a fullword binary item.

You can specify more than one index by creating a list of names enclosed in parentheses.

INDex KEY is index-name

Specifies one or more record-specified index keys for a multiply-occurring group record element or a subordinate record element. Index-name identifies an elementary element that is subordinate to the associated element. It must be the primary name of the subordinate element; it cannot be a synonym.

You can specify more than one index key by creating a list enclosed in parentheses. Each key can be either ascending or descending.

Note that the INDEX KEY clause allows a mixed collating sequence (that is, a mixture of ascending and descending keys); the ASCENDING/DESCENDING KEY IS clause does not.

ASCending

Sorts the designated key in ascending order.

DEScending

Sorts the designated key in descending order.

ASCending/DEScending KEY is index-name

Specifies one or more record-specific index keys for the multiply-occurring group element or subordinate element.

Index-name must be the primary name of an element that is subordinate to the named group element. ASCENDING and DESCENDING sorts the subordinate elements within a multiply-occurring field in ascending or descending order, respectively.

You can specify more than one index key by creating a list enclosed in parentheses.

EDIT TABle is

Specifies an edit table associated with the record element. An edit table contains a list of valid or invalid values for the record element used by the DC/UCF mapping facility.

VALid

Indicates the edit table contains valid values for the record element. VALID is the default.

INValid

Indicates the edit table contains invalid values for the record element.

'value'

Specifies a value for the edit table. Value is a 1- to 34-character value enclosed in quotes. Separate one value from another with a blank or comma; for example, ('A' 'E' 'G' THRU 'M' 'X').

THRu 'value'

Specifies a range of values for the edit table.

CODe TABle is

Specifies a translation table to be associated with the record element; for example, a record element containing state abbreviations could have a code table that identifies the name of the state:

code table is ('ak' 'alaska' 'al' 'alabama' 'ar' 'arkansas'...)

Code tables are used by the DC/UCF mapping facility.

'encode-value'

Identifies the value to be translated. Encode-value is a 1- to 34-character value enclosed in quotes.

'decode-value'

Identifies the translated value. Decode-value is a 1- to 64-character value enclosed in quotes. Null values ('') and NOT FOUND are also valid.

EXTernal PICture is picture

Defines the display format for record-element data. The picture is available to all map fields that use the record element.

OLQ header

Defines one or more column headers to be used in place of the element name in CA OLQ reports.

CULprit header

Defines one or more column headers to be used in place of the element name in CA Culprit reports.

COMments

Defines comments to be associated with the element description.

DEFinitions

Defines a description of use or purpose for the record element

comment-key

Defines a user-supplied name to be associated with comments about the record element. If comment-key contains embedded blanks or delimiters, enclose it in quotes.

comment-text

Specifies text associated with headings, definitions, or comments. Comment-text can be any length; nonnumeric literals must be enclosed in quotes. Note, however, that when coding headers, the rules for header definition must be applied to comment-text. See the CA OLQ Reference Guide or the CA Culprit for further details.

Comment-text can be continued for any number of lines. To continue a header or comment to the next line, code a hyphen in the next line, and code a quote followed by the text of the continued comment after the hyphen. Code a closing quote after the text of the final line.

Comments appear in schema source listings and subschema dictionary listings, and in DML listings when the SCHEMA-COMMENTS option is specified to the DML precompiler.

NULl

Removes text associated with headings, definitions, or comments.