ELEMENT

ELEMENT statements are used to define group or elementary data elements. Also known as fields and data items, elements can participate in records that are built by the DDDL compiler, by the CA IDMS schema compiler, or in maps that are built by the DC/UCF mapping compiler. Elements can also exist independently in the dictionary. An element can have a maximum length of 32,767 characters.
idmscu19
ELEMENT statements are used to define group or elementary data elements. Also known as
fields
and
data items
, elements can participate in records that are built by the DDDL compiler, by the CA IDMS schema compiler, or in maps that are built by the DC/UCF mapping compiler. Elements can also exist independently in the dictionary. An element can have a maximum length of 32,767 characters.
Optional ELEMENT statement clauses allow the user to:
  • Define element synonyms.
  • Describe up to four alternate pictures for an element.
  • Relate elements to users and to other elementary and group elements. The syntax supports attribute/entity relationships, all entity-occurrence documentation options, all 1974 ANSI COBOL picture options, and 31 digit zoned and packed decimal numerics.
This article describes the following information:
2
2
Defining Group Element Occurrences
The user defines and maintains group element occurrences with SUBORDINATE ELEMENT clauses, which provide one method for documenting multiply occurring or redefined elements/groups in the dictionary.
Modifying an Element Definition
When the user modifies an element definition, the DDDL compiler does not modify the definitions of records in which the named element participates. Record elements must be modified individually by using the RECORD ELEMENT substatement, described under RECORD (REPORT/TRANSACTION) later in this section.
Deleting Element Occurrences
The user cannot delete element occurrences that are members of a group element structure or that participate in IDD- or schema-built records. To delete an elementary element, the user must first disassociate it from the group element. To delete a record element, the user must first delete its associated record or schema. To prevent the deletion of an element when the only record in which it participates is deleted, select the SET OPTIONS statement DELETE IS OFF option for the session. See SET OPTIONS Statement for further details.
Required Authority
If the SET OPTIONS statement specifies SECURITY FOR IDD IS ON, the user must be assigned the proper authority to issue ELEMENT statements.
Syntax
ELEMENT Statement
►►─┬─ ADD ─────┬─ ELement name is
element-name
───────────────────────────────► ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘ ►─┬───────────────────────────────────────────┬──────────────────────────────► └─ Version is ─┬─
version-number
─────────┬─┘ └─┬────────┬─┬─ HIGhest ─┬─┘ └─ NEXt ─┘ └─ LOWest ──┘ ►─┬────────────────────────────────────────────────────────┬─────────────────► └─┬─ PREpared ─┬─ by
user-id
┬────────────────────────┬─┘ └─ REVised ──┘ └─ PASsword is
password
─┘ ┌────────────────────────────────────────────────────────────────────────┐ ►─▼─┬────────────────────────────────────────────────────────────────────┬─┴─► └─ SAMe AS ELement
element-name
─┬──────────────────────────────────┬┘ └─ Version is ─┬─
version-number
─┬┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─ COPy ─┬─ ELements ──────────┬─ FROm element
element-name
───────────── ├─ ALL COMment TYPes ─┤ ├─ ATTributes ────────┤ ├─ USErs ─────────────┤ ├─ COMments ──────────┤ ├─ DEFinition ────────┤ ├─ VALues ────────────┤ ├─ RANges ────────────┤ ├─
comment-key
───────┤ └─
relational-key
────┘ ─────────────────────────────────────────┐ ─►───────────────────────────────────────┬─┴──────────────────────────────────► ───┬─────────────────────────────────┬─┘ └─ Version is ─┬─
version-number
─┤ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ►─┬────────────────────────────────────────────────────────────────────────┬─► └─ NEW NAMe is
new-element-name
──┬─────────────────────────────────────┬┘ └─ Version is ─┬─
version-number
─────┤ └─ NEXt ─┬─ HIGhest ─┬─┘ └─ LOWest ──┘ ►─┬───────────────────────────────────────────┬──────────────────────────────► └─ NEW Version is ─┬─
new-version-number
─┬─┘ └─ NEXt ─┬─ HIGhest ─┬─┘ └─ LOWest ──┘ ►─┬────────────────────────────────────────────┬─────────────────────────────► └─ element DEScription is
description-text
──┘ ┌─────────────────────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────────────────────┬─┴────────► └─┬─ INClude ◄ ─┬─ USEr is
user-id
──┬──────────────────────┬─┘ └─ EXClude ───┘ └─
user-specification
─┘ (for complete
user-specification
syntax, see USER clause) ►─┬──────────────────────────────────────────────────────┬───────────────────► └─ PUBlic access is ─┬───────────┬─ for ─┬─ ALL ◄ ───┬─┘ └─ ALLOwed ─┘ ├─ NONe ────┤ ├─ UPDate ──┤ ├─ MODify ──┤ ├─ REPlace ─┤ ├─ DELete ──┤ └─ DISplay ─┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─ VALues ─┬─ is ──┬───────────────────────────────────── └─ EXClude ───┘ └─ are ─┘ ──────────────────────────────────────────────────────────────────────────── ─►────────────────────────────────────────────────────────────────────────────►─ ┌───────────────────────────────────────────────────────────────── ─┬─────┬──▼─┬───────┬─┬─
initial-value
───┬───────────────────────────────── └─ ( ─┘ └─ ALL ─┘ └─
condition-value
─┘ ────────────────────────────────────────────────────┐ ─►──────────────────────────────────────────────────┬─┴───────────────────────► ────────────────────────────────────────┐ │ ─┬────────────────────────────────────┬─┴─┬─────┬─┘ └─ THRu ─┬───────┬─
condition-value
─┘ └─ ) ─┘ └─ ALL ─┘ ►─┬───────────────────────┬──────────────────────────────────────────────────► └─ EXClude ALL VALUES ──┘ ┌──────────────────────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────────────────────┬──┴───────► └─┬─ INClude ◄ ─┬─ RANge is
start-value
─┬──────────────────┬─┘ └─ EXClude ───┘ └─ THRu
end-value
─┘ ►─┬───────────────────────┬──────────────────────────────────────────────────► └─ EXClude ALL RANGES ──┘ ┌─────────────────────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────────────────────┬─┴────────► └─┬─ PRimary ◄ ────────────────┬──┬─────────────────────────┬─┘ └─
alternate-format-keyword
─┘ └─
format-specification
──┘ (expanded
format-specification
syntax follows this syntax diagram) ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─ ELement name SYNonym is
element-synonym-name
─────────── └─ EXClude ───┘ ────────────────────────────────────────────────┐ ─►──────────────────────────────────────────────┬─┴───────────────────────────► ─┬─────────────────────────────────────────┬──┘ └─ FOR GROup synonym
group-synonym-name
──┘ ┌────────────────────────────────────────────────────────────────────────┐ ►─▼─┬────────────────────────────────────────────────────────────────────┬─┴─► └─┬─ INClude ◄ ─┬
class-name
is
attribute-name
┬───────────────────┬─┘ └─ EXClude ───┘ └ TEXt is
user-text
┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬──
relational-key
is
element-name
────────────────────── └─ EXClude ───┘ ───────────────────────────────────────────────────────────────────┐ ─►─────────────────────────────────────────────────────────────────┬─┴────────► ─┬───────────────────────────────────┬──┬──────────────────────┬─┘ └─ Version is ─┬─
version-number
─┬─┘ └─ TEXt is
user-text
──┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ┌───────────────────────────────────────────────────────────────┐ ►─▼─┬───────────────────────────────────────────────────────────┬─┴──────────► │ ┌────────────────────┐ │ └─ EDIt ─┬─ COMments ────┬───▼─
edit-instruction
─┴─ QUIT ──┘ ├─ DEFinition ──┤ └─
comment-key
─┘ ┌──────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────┬──┴───────────────────────►◄ └─┬─ COMments ─────┬── is ─┬─ NULl ─────────┬─┘ ├─ DEFinition ───┤ └─
comment-text
─┘ └─
comment-key
──┘
Expansion of
format-specification
►►─┬────────────────────────────┬─────────────────────────────────────────────► └─ PICture is ─┬─ NULl ◄ ──┬─┘ └─
picture
─┘ ►─┬────────────────────────────┬─────────────────────────────────────────────► └─ USAge is ─┬─ DISplay ◄ ─┬─┘ └─
usage
─────┘ ►─┬──────────────────────────┬───────────────────────────────────────────────► └─ JUStify is ─┬─ OFF ◄ ─┬─┘ └─ ON ────┘ ►─┬──────────────────────────────────┬───────────────────────────────────────► └─ BLAnk when ZERo is ─┬─ OFF ◄ ─┬─┘ └─ ON ────┘ ►─┬───────────────────────────────────────────────────────┬──────────────────► └─ SIGn is ─┬─ NULl ◄ ────────────────────────────────┬─┘ └─┬─ LEAding ──┬─┬──────────────────────┬─┘ └─ TRAiling ─┘ └─ SEParate character ─┘ ►─┬─────────────────┬────────────────────────────────────────────────────────► └─┬─ SYNc ──────┬─┘ └─ NO SYNc ◄ ─┘ ►─┬─────────────────────────────────┬────────────────────────────────────────► └─ EXClude SUBordinate ELements ──┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ │ ┌─────────────────────────────────────── └─ SUBordinate elements are ─┬───┬─▼──
subordinate-element-name
─────────── └ ( ┘ ─►────────────────────────────────────────────────────────────────────────┬───►◄ ──────────────────────────────────────────────────────────────────┐ │ ─┬────────────────────────────────┬┬─────────────────────────────┬┴┬───┬┘ └ Version is ┬─
version-number
─┬┘└┬ OCCurs
occurrence-count
─┬─┘ └ ) ┘ ├─ HIGhest ────────┤ └ (R) ─────────────────────┘ └─ LOWest ─────────┘
DISPLAY/PUNCH ELEMENT Statement (for a single element)
►►─┬─ DISplay ─┬─ ELement name is
element-name
───────────────────────────────► └─ PUNch ───┘ ►─┬───────────────────────────────────────────────────┬──────────────────────► └─ PREpared by
user-id
─┬─────────────────────────┬─┘ └─ PASsword is
password
──┘ ┌───────────────────────────────────────────────────────────┐ ►─▼─┬───────────────────────────────────────────────────────┬─┴──────────────► │ ┌───────────────────────────────────┐ │ └─┬─ WITh ──────┬─▼──┬─ ALL ───────────────────────┬──┴─┘ ├─ ALSo WITh ─┤ ├─ ALL COMment TYPes ─────────┤ └─ WITHOut ───┘ ├─ ATTributes ────────────────┤ ├─ COMments ──────────────────┤ ├─ DEFinitions ───────────────┤ ├─ DETails ───────────────────┤ ├─ ELements ──────────────────┤ ├─ HIStory ───────────────────┤ ├─ MAPs ──────────────────────┤ ├─ NONE ──────────────────────┤ ├─ PROgrams ──────────────────┤ ├─ SAMe AS ───────────────────┤ ├─ SUBordinate ELements ──────┤ ├─ SYNonyms ──────────────────┤ ├─ USErs ─────────────────────┤ ├─┬─ USEr DEFINED COMments ─┬─┤ │ └─ UDCs ──────────────────┘ │ ├─┬─ USEr DEFINED NESts ─┬────┤ │ └─ UDNS ───────────────┘ │ └─ WHEre USED ────────────────┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule
module-name
─┬───────────────────────────────────┬──────── └─ Version is ─┬─
version-number
─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is
language
┘└ PREpared by
user-id
┬───────────────────────┬┘ └ PASsword is
password
─┘ ►─┬──────────────────────┬──┬─────────────────────┬──────────────────────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
DISPLAY/PUNCH ELEMENT Statement (for multiple elements)
►►─┬─ DISplay ─┬─┬─ ALL ──────────────────────────┬─ ELEments ────────────────► └─ PUNch ───┘ └─┬─ FIRst ─┬─┬─ 1 ◄ ──────────┬─┘ ├─ NEXt ──┤ └─
entity-count
─┘ ├─ LASt ──┤ └─ PRIor ─┘ ►─┬──────────────────────────────────────────────────┬───────────────────────► └─ PREpared by
user-id
─┬────────────────────────┬─┘ └─ PASsword is
password
─┘ ►─┬─────────────────────────────────┬────────────────────────────────────────► └─ WHEre
conditional-expression
──┘ (for complete
conditional-expression
syntax, see WHERE clause) ►─┬───────────────────┬──────────────────────────────────────────────────────► └─ BY ─┬─ SET ────┬─┘ └─ AREa ◄ ─┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule
module-name
─┬───────────────────────────────────┬──────── └─ Version is ─┬─
version-number
─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is
language
┘└ PREpared by
user-id
┬───────────────────────┬┘ └ PASsword is
password
─┘ ►─┬──────────────────────┬──┬──────────────────────────────────────┬─────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬──┬─────────────┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ └─ RECursive ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
Parameters
  • ELement name is
    element-name
    Identifies a new element to be established in the dictionary or an existing element to be modified, replaced, deleted, displayed, or punched.
    Element-name
    must be a 1- through 32-character alphanumeric value. (If you use
    element-name
    in a program, observe the maximum-character limit of the programming language.)
  • NEW NAMe is
    new-element-name
    Specifies a new name for the requested element. If a version number is not specified, the version number defaults to the version associated with the original name of the element. This clause changes only the name of the element occurrence; it does not alter or delete any relationships in which the element participates. Subsequent references to the requested element must specify the new name.
    If the primary synonym of the element (the synonym that is identical to the primary name of the element) participates in a record, the element cannot be renamed.
  • NEW Version is
    Specifies a new version number for the named element.
  • new-version-number
    /NEXt HIGHEST/NEXT LOWest
    Specifies a version number for the named element. The element name and new version number must not duplicate an existing element name and version number.
  • VALue is ALL
    initial-value
    /
    condition-value
    Associates (INCLUDE) or disassociates (EXCLUDE) a value, range of values, or a list of values assigned to a COBOL level-88 condition name. A list of values must be enclosed by parentheses, with values separated by a space or comma.
    Initial-value
    and
    condition-value
    can be 1- through 32-character numeric literals, quoted literals, or figurative constants.
    If the SET OPTIONS statement specifies DECIMAL-POINT ISCOMMA, the DDDL compiler interprets a period in numeric literal as an insertion character, and a comma as a decimal point.
  • THRu ALL
    condition-value
    Specifies multiple values and ranges of values when the element is a COBOL level-88 condition name.
  • EXClude ALL VALUES
    Removes all VALUE clauses from the element definition. The keyword VALUES cannot be abbreviated. Typically, the EXCLUDE ALL VALUES clause is used to remove the values that are associated with an element in preparation for adding subordinate elements.
  • RANge is
    start-value
    THRu
    end-value
    Specifies a normal or expected value or range of values for the named element.
    Start-value
    and
    end-value
    must be 1- through 32-character numeric literals or figurative constants. Values that contain delimiters or embedded blanks must be enclosed in site-standard quotation marks. The user can enter each acceptable value in a separate RANGE clause or can enter a range of values in one clause that includes the THRU option. For example:
    range is 1 range is 3 range is 5
    or
    range is 1 thru 5
    The RANGE clause is documentation except in the CA ADS Batch environment. CA ADS Batch uses RANGE clause values to validate input data fields (see
    CA ADS Using section
    ).
  • EXClude ALL RANGES
    Removes all range clauses from the element occurrence.
  • PRImary
    Specifies the default format of the named element. The PRIMARY/
    alternate-format-keyword
    clause is used with the RECORD statement FORMAT clause to determine the format of an element within a record occurrence. For information about the FORMAT clause, see RECORD (REPORT/TRANSACTION), later in this section.
  • alternate-format-keyword
    Specifies a keyword that corresponds to an alternate format established previously in the ALTERNATE PICTURE KEYWORD clause of the SET OPTIONS statement (see SET OPTIONS Statement). Up to four alternate formats can be defined for each element. The PRIMARY/
    alternate-format-keyword
    clause is used with the RECORD statement FORMAT clause to determine the format of an element within a record occurrence. For information about the FORMAT clause, see RECORD (REPORT/TRANSACTION), later in this section.
  • PICture is
    Identifies the named element as an elementary element and specifies its length and data type.
  • NULl
    Removes PICTURE, USAGE, SIGN, JUSTIFY, and BLANK WHEN ZERO clauses from the element, and all associated subordinate elements. NULl is the default.
    The maximum length of an element (including its usage) is 32,767 characters.
  • picture
    When a named element that is previously defined as a group element, PICTURE IS
    picture
    removes any associated subordinate elements except COBOL level-88 condition names, and
    picture
    becomes the picture for the resulting elementary element.
    Picture
    must be a 1- through 30-character value that describes alphanumeric, alphabetic, numeric, or numeric-edited data, as shown in the table under the bold heading
    Usage
    , after this parameter list.
  • USAge is
    Specifies the physical storage characteristics of the named element.
  • DISplay
    Identifies the usage as alphanumeric, zoned decimal, edited, or display floating point. DISPLAY is the default.
    For CA ADS users, additional information about defining display floating point numerics is available in the
    CA ADS Reference section
    .
  • usage
    Identifies one of the following usages:
    • BIT
      -- Bit string
    • POINTER
      -- Full word address constant
    • CONDITION-NAME
      -- :i1.level-88 COBOL level-88 value
    • COMPUTATIONAL (COMP) (COMPUTATIONAL-4) (COMP-4) (BINARY)
      -- Binary
    • COMPUTATIONAL-1 (COMP-1) (SHORT-POINT)
      -- Short-precision floating point
    • COMPUTATIONAL-2 (COMP-2) (LONG-POINT)
      -- Long-precision floating point
    • COMPUTATIONAL-3 (COMP-3) (PACKED)
      -- Packed decimal
    • SQLBINARY (SQLBIN)
      --  An SQL BINARY data type; Identifies a fixed-length array of bytes and should be defined with PIC X(n) where n is in the range 1 through 32,760.
  • JUStify is
    Defines COBOL justification specifications for the named element.
  • OFF
    Specifies that a COBOL JUSTIFIED clause is not to be generated. OFF is the default.
  • ON
    Specifies that a COBOL JUSTIFIED clause is to be generated.
  • BLAnk when ZERo is
    Defines COBOL zero suppression requirements for the named element.
  • OFF
    Specifies that a BLANK WHEN ZERO clause is not to be generated for COBOL. OFF is the default.
  • ON
    Specifies that a BLANK WHEN ZERO clause is to be generated for COBOL.
  • SIGn is
    Defines or deletes a sign specification for the named element.
  • NULl
    Specifies that the sign and LEADING or TRAILING SEPARATE CHARACTER specification is removed from the named element.
  • LEAding/TRAiling
    Specifies that a sign is associated with the named element. Further specifies that the sign appears in either the LEADING or the TRAILING position.
  • SEParate character
    Reserves a separate character in the element definition for the sign designation.
  • SYNc
    Specifies that the DDDL compiler must check the boundary alignment of COMP and COMP-4 record elements when the elements are included in a record. If a record element is not on a fullword or halfword boundary, the record is flagged in error.
  • NO SYNc
    Specifies that the DDDL compiler does
    not
    check the boundary alignment of COMP and COMP-4 record elements when they are included in a record. NO SYNC is the default.
  • EXClude SUBordinate ELEments
    Removes all subordinate elements, regardless of level number, from a group element. The PICTURE IS NULL specification (described above) ordinarily performs this function. However, if the subordinate elements are all level-88 condition names, the EXCLUDE SUBORDINATE ELEMENTS must be used. To replace existing subordinate elements with new subordinate elements, use the SUBORDINATE ELEMENTS clause (described below).
  • SUBordinate ELements are
    subordinate-element-name
    Specifies that the named element is a group element and identifies one or more subordinate elements.
    Subordinate-element-name
    is the primary name of a subordinate element that exists in the dictionary. The SUBORDINATE ELEMENTS clause can be repeated to define a group structure of any size. If an element name matches a DDDL keyword, a list of subordinate-element names can be enclosed in parentheses to eliminate errors that can occur.
    To define a filler as a subordinate element, specify an element name of 'FIL
    nnnn
    ';
    nnnn
    must be a four-digit numeric value (leading zeros are required) and must be separated from the keyword FIL by one space. For example, to generate a filler that is described as FILLER PIC X(7), specify SUBORDINATE ELEMENT 'FIL 0007'. Filler fields are not required in the dictionary to be included in group elements or records. An element can be named only once in a SUBORDINATE ELEMENTS clause; however, fillers can appear as often as required.
    Each subordinate element can be qualified with either the OCCURS or R parameter.
  • OCCurs
    occurrence-count
    Specifies that the subordinate element is a multiply occurring element.
    Occurrence-count
    must be an integer in the range 1 through 32,767.
  • (R)
    Redefines the previously named subordinate element. NOTE A redefined element cannot be defined with an OCCURS clause, however, it can be subordinate to an element defined with an OCCURS clause.
    NOTE If a subordinate element must be defined with both an OCCURS and a REDEFINES clause, include the (R) option within the named element definition and the OCCURS option with the definition of the record in which the subordinate element participates.
  • ELement name SYNonym is
    element-synonym
    Associates (INCLUDE) an alternative name with or disassociates it (EXCLUDE) from the element.
    Element-synonym
    must be a 1- through 32-character alphanumeric value.
    All elements have at least one synonym, which is known as the primary synonym, with the same name and version as the element itself.
  • FOR GROup synonym
    group-element-name
    Specifies that when the named element appears in a record as part of a group element whose name matches
    group-element-name
    , the specified element synonym is automatically used in the record. The following considerations apply:
    • The group element need not exist in the dictionary.
    • Group-element-name
      must identify a group element at the level immediately above
      element-synonym
      .
    • If
      element-synonym
      is the highest level element in a record,
      group-element-name
      identifies the record in which the element participates.
    • Group-element-name
      can be the primary name of a record or group, or a synonym.
  • WITh/ALSo WITh/WITHOut
    Includes or excludes the specified options when the named element is displayed or punched. Detailed information for each DISPLAY/PUNCH option is under SET OPTIONS Syntax. The options that are listed below present special considerations for this entity type.
  • DETails
    Includes the DESCRIPTION, VALUE, and RANGE specifications and PICTURE-related information for primary and alternative formats, including SUBORDINATE ELEMENTS specifications.
  • ELements
    Includes all user-defined nests and subordinate elements.
  • MAPs
    Includes the name of the map that is associated with the element occurrence or any of its synonyms.
  • PROgrams
    Includes the name of the program and record that is associated with an element occurrence or any of its synonyms.
  • SYNonyms
    Displays record synonyms that are associated with element synonyms.
Usage
Specifying a
picture
variable
Picture
must be a 1- through 30-character value that describes the types of data that is shown in the following table.
Category
Character
Description
Alphanumeric data
X
Represents one alphanumeric character. If USAGE IS BIT, X represents one bit; the USAGE clause is described in the parameters list. If USAGE IS SQLBINARY, X represents one byte; the USAGE clause is described in the parameters list.
(n)
An integer in parentheses after an X
Represents
n
repetitions of the alphanumeric character; for example, X(4) is equivalent to XXXX.
Alphabetic data
A
Represents one alphabetic character (A-Z).
(n)
An integer in parentheses after an A
Represents
n
repetitions of the alphabetic character
Numeric data
9
Represents one numeric character.
(n)
An integer in parentheses after a 9
Represents
n
repetitions of the numeric character.
Numeric elements with a usage clause of packed or zoned decimal cannot exceed a maximum length of 31 digits.
V
Represents an assumed decimal point. No more than one V can appear in an element picture. If the V is omitted and the P option (described below) is not used, the assumed decimal point is after the rightmost 9.
P
Represents an assumed zero. Any number of Ps can appear in the leftmost or the rightmost positions of an element picture. An assumed decimal point is automatically placed before the first P or after the last P. The character P does not occupy a storage position (for example, PP9999 has a data length of 4).
S
Identifies the number as positive or negative. When used, the S must be the first character in the element picture. When the S is omitted, values for the element description are assumed to be positive.
Numeric-edited data
(Includes the numeric data characters described above, with the editing characters shown at the right)
Z
+
,
B
CR
-
0
DB
*
$
.
Represent edit symbols that are used in reporting data; quotation marks are not required. Refer to the appropriate programming language documentation for the individual interpretations of these symbols.
If the SET OPTIONS statement specifies DECIMAL-POINT IS COMMA, a period (.) is interpreted as an insertion character and a comma (,) is interpreted as a decimal point.
If you specify REPLACE
If you specify REPLACE in the ELEMENT statement, the DDDL compiler initializes to defaults and/or excludes the following options:
  • DESCRIPTION
  • USAGE
  • PICTURE
  • JUSTIFY
  • BLANK WHEN ZERO
  • USER REGISTERED FOR
  • PUBLIC ACCESS
  • Related attributes
  • VALUE
  • RANGE
  • ELEMENT NAME SYNONYM
  • COMMENTS/DEFINITION/
    comment-key
  • SIGN
  • SUBORDINATE ELEMENTS
  • Alternate picture formats
  • Related elements
The following relationships are not affected:
  • Group elements in which the named element participates
  • Records in which the named element participates
Examples
In the following example, the first three ADD statements define the elements DISCONTINUE-MONTH, DISCONTINUE-DAY, DISCONTINUE-YEAR, documenting the normal range of values for DISCONTINUE-MONTH as 01 through 12 and for DISCONTINUE-DAY as 01 through 31. The SET OPTIONS statement establishes a default PREPARED BY specification for the session. The fourth ADD statement establishes the group element DISCONTINUE-DATE and names its subordinate elements; the last ADD statement establishes an element that is called DISC-DATE-X.
add element discontinue-month prepared by dba password is 'ice 9' picture 99 range is 01 thru 12. set options for session prepared by dba password is 'ice 9' add element discontinue-day picture 99 range is 01 thru 31. add element discontinue-year picture 99. add element discontinue-date subordinate elements discontinue-month discontinue-day discontinue-year. add element disc-date-x picture x(6).
In the following example, the first two ADD statements define the elements LOWER-LIMIT and QUANTITY-ON-HAND. The third statement adds the group element HISTORY and assigns four subordinate elements; (R) indicates that DISC-DATE-X (established in the previous example) redefines DISCONTINUE-DATE. DISCONTINUE-DATE is subordinate to HISTORY and is also a group element.
add element lower-limit prepared by dba password is 'ice 9' picture 999. add element quantity-on-hand prepared by dba password is 'ice 9' picture 9(4). add element history subordinate elements discontinue-date disc-date-x (r) lower-limit quantity-on-hand.
The following example illustrates the usage of the PRIMARY/
alternate-format
clause to define alternate formats. SET OPTIONS establishes three alternate picture keywords; the definition of element GROSS-PAY includes three alternate formats. Element GROSS-PAY is associated with the WS-SALARY-HISTORY record; the FORMAT clause determines the format of the elements.
set options for dictionary first alternate picture keyword is edit-pic second alternate picture keyword is report-pic third alternate picture keyword is screen-pic. add element name is gross-pay primary picture is s9(7)v99 usage is comp-3 edit-pic picture is x(9) usage is display report-pic picture is z,zzz,zzz.99 screen-pic picture is 9(7)v99 blank when zero is on. add record name is ws-salary-history format is edit-pic. record element is gross-pay. . . .