Data Item Types

The following diagram illustrates the types of data items you can specify:

<data item types>

──┬─<alpha data items>────────┬───────────────────────────────────────┤
  ├─<Boolean data items>──────┤
  ├─<date data item>──────────┤
  ├─<external LOB data items>─┤
  ├─<field data items>────────┤
  ├─<internal LOB data items>─┤
  ├─<numeric data items>──────┤
  ├─<real data items>─────────┤
  ├─<time data item>──────────┤
  └─<timestamp data item>─────┘

Each of the data items is described under a separate heading. Information that is common to all the data item types is provided under the heading “Common Options for Data Items” later in this section.

Alpha Data Items

Alpha data items are used to store character information. Information is stored as EBCDIC (8-bit) characters and is aligned on an 8-bit boundary.

The following diagrams illustrate the syntax for declaring alpha items:

<alpha data item>

──<alpha item name>─┬───────────┬─ ALPHA(<item size>) ─────────────────►
                    └─<comment>─┘
 
►─┬────────────────────────────────────────────────────┬───────────────┤
  │ ┌◄────────────────────── , ──────────────────────┐ │
  └─┴─┬─/1\─ INITIALVALUE ─┬──────┬─┬─ BLANKS ─────┬─┴─┘
      │                    ├─ IS ─┤ ├─ HIGH-VALUE ─┤
      │                    └─ = ──┘ ├─ LOW-VALUE ──┤
      │                             └─<string>─────┤
      ├─/1\─ DATAENCRYPT ─┬────────────────────────┤
      │                   └─ = ──┬─ TRUE ──────────┤
      │                          └─ FALSE ─────────┤
      ├─/1\─ DATAMASK ─┬───────────────────────────┤
      │                └─ = ──┬─ TRUE ─────────────┤
      │                       └─ FALSE ────────────┤
      ├─/1\─ NULL ─┬──────┬─┬─ BLANKS ─────────────┤
      │            ├─ IS ─┤ ├─ HIGH-VALUE ─────────┤
      │            └─ = ──┘ ├─ LOW-VALUE ──────────┤
      │                     └─<string>─────────────┤
      ├─/1\─┬─<occurs clause>──────────────────────┤
      │     ├─<size clause>────────────────────────┤
      │     └─<stored clause>──────────────────────┤
      ├─/1\─<remap option clause>──────────────────┤
      ├─/1\─ REQUIRED ─────────────────────────────┤
      ├─/1\─┬─ GEMCOS-LITERAL ─────────────────────┤
      │     ├─ GEMCOS-DATA ────────────────────────┤
      │     ├─ GEMCOS-DBSN ────────────────────────┤
      │     ├─ GEMCOS-SSN ─────────────────────────┤
      │     └─ COMS-ID ────────────────────────────┤
      └─/1\─ CCSVERSION = <ccsversion name> ───────┘

<occurs clause>

── OCCURS <unsigned integer> ─┬─────────┬──────────────────────────────►
                              └─ TIMES ─┘

►─┬──────────────────────────────────────┬─────────────────────────────┤
  └─ DEPENDING ON ─┬─<numeric item name>─┤
                   └─<real item name>────┘

<size clause>

── SIZE ─┬─ VARYING ──────────────────────────────┬────────────────────┤
         ├─ VARYING WITH ─┬─┬─<numeric item name>─┤
         └─ DEPENDING ON ─┘ └─<real item name>────┘

<stored clause>

── STORED ─┬─ OPTIONALLY ──────────────────────────────┬───────────────┤
           ├─ OPTIONALLY WITH ─┬─┬─<Boolean item name>─┤
           └─ DEPENDING ON ────┘ └─<field bit name>────┘

<remap option clause>

──┬─ HIDDEN ────────────────────────┬──────────────────────────────────┤
  └─ READONLY ─┬────────────────────┤
               ├─ NO EXCEPTION ─────┤
               └─ GIVING EXCEPTION ─┘

The following table explains the elements of the syntax diagram:

Option

Description

<alpha item name>

An alpha item name is an identifier that names the alpha item. The alpha item name cannot exceed 30 characters.

<item size>

The item size is an unsigned integer that specifies the length of a fixed item or the maximum length of a varying item. An alpha item can be at most 65535 (2**16-1) bytes in length.

CCSVERSION

The CCSVERSION option, if designated as an alpha item, enables the user to localize the database at the item-level. Designating a ccsversion at this level enables the user only to localize the individual alpha item.

If the database is being accessed by COBOL74 applications, the CCSVERSION option setting must match the CCSVERSION setting in the SPECIAL‑NAMES paragraph of the COBOL74 program.

If the database is to be accessed by applications written in RPG, the value assigned to the CCSVERSION option must be compatible with the coded character set in use on the system. If the designated ccsversion is not the system default ccsversion, a warning message is issued at compile time. At run time, the ccsversion value must match the system default ccsversion; otherwise, an open error (OPENERROR) is returned.

DATAENCRYPT

The DATAENCRYPT option enables you to encrypt specific data items within an Enterprise Database Server database. This prevents any kind of tool that can read files from a disk from accessing the data in clear text.

If a record contains an item with the DATAENCRYPT option set, its record size is larger than normal due to the encryption algorithm.

An item that specifies the DATAENCRYPT option cannot be used with the following conditions or clauses:

  • WHERE condition

  • SELECT condition

  • STORED DEPENDING ON clause

  • OCCURS DEPENDING ON clause

  • SIZE clause

If there are any items with the DATAENCRYPT option in the data set, these items will be encrypted and moved to the end of the record. This is done to maximize the performance and minimize the disk usage. The record size will be increased and the size will depend on the encryption algorithm specified. The encrypted data will always be different in each record even if the records contain the same original (unencrypted) value.

If there are any Filler data items along with the items with DATAENCRYPT option in the data set, the Filler in the record is located after all non-encrypted data items and encrypted data items. When substituting a filler item with new data items type, a reorganization is required.

A reorganization must be performed when changing the DATAENCRYPT option from TRUE to FALSE or FALSE to TRUE.

The key items in a set or subset can have the DATAENCRYPT option specified but not the key items in an Access. The key data cannot contain encrypted data items. For more information about using the DATAENCRYPT option with key items, refer to Sets, Subsets, and Accesses.

DATAMASK

The DATAMASK option enables you to obscure or ~de-identify specific data within an Enterprise Database Server database ensuring the data security is maintained, and sensitive customer information is not leaked outside of authorized environments. The DATAMASK option is not allowed for restart data sets, internal structures, or partitioned data sets. Only Alpha, Numeric, and Real data item types are valid for data masking. The reserved internal items with type Alpha such as GEMCOS are not allowed for data masking To change the CCSVERSION option of an item with the DATAMASK option set, the DATAMASK option must be reset first before changing the CCSVERSION option. This process requires two separate DASDL updates.

Key or key data cannot have the DATAMASK option specified.

For adding a new group item, DATAMASK items can only be specified for individual items within the group. This process requires two separate DASDL updates. The first DASDL update is to add the group item, this update requires a database reorganization. The second DASDL update enables the setting of the DATAMASK option to individual item(s) within the group item. At the end, an additional compilation is required. A reorganization must be performed when changing the DATAMASK option from TRUE to FALSE, or FALSE to TRUE.

An item specified with the DATAMASK option is not allowed to be used with the WHERE or SELECT condition.

Refer to the discussion under “Common Options for Data Items” later in this section for information that is common to all data item types.

The following examples illustrate alpha data item declarations.

Example 1

This example illustrates alpha data items in a data set declaration.

D DATA SET
 (
  A1 ALPHA(10);
  A2 "QUOTED COMMENT" ALPHA(15) INITIALVALUE IS BLANKS;
  A3 ALPHA(5) INITIALVALUE "ABCDE",
              NULL IS BLANKS, REQUIRED;
  A4 ALPHA(8) OCCURS 10 TIMES,
              INITIALVALUE IS LOW-VALUE;
 );

Example 2

This example illustrates alpha data items in a compact data set declaration.

C COMPACT DATA SET
 (
  B BOOLEAN;
  F FIELD
   (
    F1 BOOLEAN;
    F2 BOOLEAN;
   );
  N1 NUMBER(4);
  N2 NUMBER(3) INITIALVALUE IS 0;
  A1 ALPHA(10) OCCURS 15 TIMES;
  A2 ALPHA(8) OCCURS 50 TIMES DEPENDING ON N1;
  A3 ALPHA(200) SIZE VARYING,INITIALVALUE BLANKS;
  A4 ALPHA(200) SIZE VARYING WITH N2;
  A5 ALPHA(50) SIZE DEPENDING ON N1;
  A6 ALPHA(22) STORED OPTIONALLY,NULL IS BLANKS;
  A7 ALPHA(36) STORED OPTIONALLY WITH B;
  A8 ALPHA(15) STORED DEPENDING ON F2;
  A9 ALPHA(25) STORED DEPENDING ON F2,
     INITIALVALUE IS HIGH-VALUE;
 );

Example 3

This example illustrates alpha data items in a standard data set declaration.

D STANDARD DATA SET
 (
  D1          ALPHA(5) INITIALVALUE = "ABCDE";
  D2          REAL;
  D3          ALPHA(5) CCSVERSION = KANJI
              INITIALVALUE = "<SOK> <KANJI STRING> <EOK>";
  D4          NUMBER(10);
 ) VERIFY D2 > 100 AND D3 = "<SOK> <KANJI STRING> <EOK>";
 S1 SET OF D KEY IS D4;
D-REMAP REMAPS D
 (
  D1;
  D2;
  D3;
  D4;
 ) SELECT D3 = "<SOK> <KANJI STRING> <EOK>";

Example 4

This example includes a CCSVERSION option designation for an alpha data item.

D3 DATA SET
 (D3-ID1    REAL;
  D3-ID2    ALPHA (10) CCSVERSION = FRENCH;
  D3-ID3    ALPHA (10) CCSVERSION = FRENCH;
  D3-ID4    ALPHA (10);
 );

Boolean Data Items

Boolean items are used to store information that has a logical value of either TRUE or FALSE. Each Boolean item occupies one 4-bit digit and is aligned on a 4-bit boundary. Only the low order (rightmost) bit of the item contains information. The value TRUE is represented by 1 and the value FALSE by 0.

Boolean items must not be keys. They can, however, be included in groups that are keys.

The following diagrams illustrate the syntax for declaring Boolean items:

<Boolean data item>

──<Boolean item name>─┬───────────┬─ BOOLEAN ──────────────────────────►
                      └─<comment>─┘

►─┬───────────────────────────────────────────────┬────────────────────┤
  │ ┌◄──────────────────── , ───────────────────┐ │
  └─┴─┬─/1\─ INITIALVALUE ─┬──────┬─┬─ FALSE ─┬─┴─┘
      │                    ├─ IS ─┤ ├─ TRUE ──┤
      │                    └─ = ──┘ ├─ 0 ─────┤
      │                             └─ 1 ─────┤
      ├─/1\─<occurs clause>───────────────────┤
      └─/1\─<remap option clause>─────────────┘

<occurs clause>

── OCCURS <unsigned integer> ─┬─────────┬──────────────────────────────►
                              └─ TIMES ─┘

►─┬──────────────────────────────────────┬─────────────────────────────┤
  └─ DEPENDING ON ─┬─<numeric item name>─┤
                   └─<real item name>────┘

<remap option clause>

──┬─ HIDDEN ────────────────────────┬──────────────────────────────────┤
  └─ READONLY ─┬────────────────────┤
               ├─ NO EXCEPTION ─────┤
               └─ GIVING EXCEPTION ─┘

Explanation

Boolean item name is an identifier that names the item. The Boolean item name cannot exceed 30 characters.

Refer to the discussion under “Common Options for Data Items” later in this section for information that is common to all data item types.

The following examples illustrate the use of Boolean data items.

Example 1

This example illustrates Boolean data items in a data set declaration.

D DATA SET
 (
  A BOOLEAN;
  B BOOLEAN INITIALVALUE IS TRUE;
  C BOOLEAN INITIALVALUE IS 0,
            OCCURS 10 TIMES;
  X ALPHA(3);
 );

Example 2

This example illustrates Boolean data items in a compact data set declaration.

C COMPACT DATA SET
 (
  N NUMBER(3);
  A BOOLEAN INITIALVALUE IS 1;
  B BOOLEAN OCCURS 10 TIMES DEPENDING ON N;
  D BOOLEAN OCCURS 15 TIMES DEPENDING ON N;
  E BOOLEAN OCCURS 20 TIMES;
 );

Date Data Items

Date data items are used to store a particular month, day, and year at which some events happened or will happen. Information is stored as an integer of INTEGER_OF_DATE(X) in ALGOL or INTEGER-OF-DATE(X) in COBOL85, where X must be an integer in the form YYMMDD. An initial value can be specified in the format of YYYYMMDD.

ALGOL applications that access date data items require the following INCLUDE statement:

$ INCLUDE = "SYMBOL/INTL/ALGOL/DMS/PROPERTIES." 10000000-89999999

Refer to the following documents for additional information and examples for ALGOL and COBOL usage of the date data item:

  • Interpretive Interface Programming Reference Manual

  • Application Program Interfaces Programming Guide

  • ALGOL Programming Reference Manual, Volume 1

  • COBOL ANSI-85 Programming Reference Manual, Volume 1

The SLICESUPPORT library is declared in *SYMBOL/INTL/ALGOL/PROPERTIES. If you declare this library in your program, you need to remove the library declaration.

The following diagram illustrates the syntax for declaring date data items.

<date data item>

── <date item name> ──── DATE──┬─────────────────────────────────────┬──────┤
                               ├─ <1> INITIALVALUE ─┬─ = ─┬─<number>─┤
                               │                    └ IS ─┘          │
                               ├─ <1> DATAMASK ─┬───────────┬────────┤
                               │                └ = ┬───TRUE┤        │ 
                               │                    └─ FALSE┘        │
                               ├─ <1> REQUIRED ──────────────────────┤
                               └─ <1> <remap option clause> ─────────┘

The following examples illustrate the use of date data items.

Example 1

This example illustrates the use of a date item in a data set declaration. The item TRDATE occupies 12 digits and contains a binary integer.

D DATA SET
 (
N1 NUMBER(5);
N2 NUMBER(S7,2) INITIALVALUE IS 0;
TRDATE DATE;
 );

Example 2

This example illustrates the use of a date item in a data set declaration with an initial value. The item TRDATE occupies 12 digits and contains a binary integer.

D DATA SET
 (
  N1 NUMBER(5);
  N2 NUMBER(S7,2) INITIALVALUE IS 0;
  TRDATE DATE INITIALVALUE IS 19750919;
 );

External Large Object (LOB) Data Items

External large object (LOB) items are used to store the file name of a binary large object (BLOB) or a character large object (CLOB). These LOB files can contain images, video, audio, text, and so forth. The file name is stored as EBCDIC (8-bit) characters and is aligned on an 8-bit (byte) boundary.

The following diagram illustrates the syntax for declaring an external LOB item:

<external LOB data item>

──<item name>─┬───────────┬─ EXTERNAL ─┬─ BLOB ─┬─<item size>──────────►
              └─<comment>─┘            └─ CLOB ─┘
►─┬──────────────────────────────────────────────┬─────────────────────┤
  │ ┌◄─────────────────── , ───────────────────┐ │
  └─┴─┬─/1\─ INITIALVALUE ─┬──────┬─<string>─┬─┴─┘
      │                    ├─ IS ─┤          │
      │                    └─ = ──┘          │
      ├─/1\─ NULL ─┬──────┬─┬─ BLANKS ───────┤
      │            ├─ IS ─┤ ├─ HIGH-VALUE ───┤
      │            └─ = ──┘ ├─ LOW-VALUE ────┤
      │                     └─<string>───────┤
      ├─/1\─┬─<occurs clause>────────────────┤
      │     ├─<size clause>──────────────────┤
      │     └─<stored clause>────────────────┤
      ├─/1\─<remap option clause>────────────┤
      ├─/1\─ REQUIRED ───────────────────────┤
      └─/1\─ CCSVERSION = <ccsversion name> ─┘

<occurs clause>

── OCCURS ──<unsigned integer>─────────────────────────────────────────►
►─┬──────────────────────────────────────┬─────────────────────────────┤
  └─ DEPENDING ON ─┬─<numeric item name>─┤
                   └─<real item name>────┘

<size clause>

── SIZE ─┬─ VARYING ───────────────────────────┬───────────────────────┤
         ├─ VARYING WITH ──<numeric item name>─┤
         └─ DEPENDING ON ──<real item name>────┘

<stored clause>

── STORED ─┬─ OPTONALLY ───────────────────────────────┬───────────────┤
           ├─ OPTIONALLY WITH ─┬─┬─<Boolean item name>─┤
           └─ DEPENDING ON ────┘ └─<field bit name>────┘

<remap option clause>

──┬─ HIDDEN ────────────────────────┬──────────────────────────────────┤
  └─ READONLY ─┬────────────────────┤
               ├─ NO EXCEPTION ─────┤
               └─ GIVING EXCEPTION ─┘

The following table explains the elements of the syntax diagram.

Option

Description

<item name>

An item name is an identifier that names the data item declared as an external LOB item. The item name cannot exceed 30 characters. This item cannot be declared in the restart data set or used as a key item.

<item size>

The item size is an unsigned integer that specifies the length of a fixed item or the maximum length of a varying item. The maximum length of an external LOB item is 4095 characters.

Example 1

The following example shows a declaration for an external BLOB item called PHOTO. The file title length cannot exceed 50 characters. The value of PHOTO is in the path name. PHOTO is in the user record.

PERSON
(
PHOTO EXTERNAL BLOB (50);
);

Example 2

The following example is similar to Example 1 except that the item can occur five times.

PERSON
(
PHOTO
EXTERNAL BLOB (50) OCCURS 5 TIMES;
 );

Example 3

The following example shows a type and timestamp declarations. You can also declare other associated fields.

PERSON
(
PHOTO-BLOB GROUP
(PHOTO-TYPE ALPHA (6); %"JPEG"
PHOTO-TIMESTAMP REAL;
PHOTO EXTERNAL BLOB(50);
) OCCURS 5 TIMES;
);

Field Data Items

Field items can be used to store unsigned integer and Boolean values.

When an item size is specified, the field can be used to store unsigned integer values in binary form. The item size controls the number of bits allocated for the item. The item size must be an unsigned integer between 1 and 48.

The maximum value that a field item can contain is controlled by the item size. If the item size is less than or equal to 39, then the field can contain any integer value between 0 and (2 ** <item size>)–1. For item size values of greater than 39, the field can contain integer values between 0 and (2 ** 39)–1.

When the individual bits in the field are named, each bit can be used to store a logical value of either TRUE or FALSE. The value TRUE is represented by 1 and the value FALSE by 0. This option can be used to minimize storage space when several Boolean items are required.

By referencing the field item name, the entire field of Boolean items can be treated as an unsigned integer value if the number of Boolean items is less than or equal to 39. If the field item contains more than 39 Boolean items, the entire field of Boolean items can be treated as a real value by referencing the field item name. If a real value greater than 2 ** 39 –1 is assigned, the assigned value can be normalized, causing the bits in the field to contain an unexpected value.

Field items always begin on a 4-bit digit boundary and occupy an integral number of 4-bit digits; thus, an item containing one to four bits is allocated one digit, an item containing five to eight bits is allocated two digits, and so on. If the item size is not a multiple of four, the extra bits allocated by the system are inaccessible and does not contain valid information. For example:

F FIELD(5);

The letter F occupies two digits (8 bits); but only five bits contain information. The three filler bits are inaccessible and contain no valid information.

The following diagrams illustrate the syntax for declaring a field item:

<field data item>

──<field item name>─┬───────────┬─ FIELD ──────────────────────────────►
                    └─<comment>─┘  
       
►─ ( ─┬─<item size>────────────────────────────┬─ ) ───────────────────►
      │ ┌◄───────────── ; ─────────────┐       │
      └─┴─/48\─<field bit declaration>─┴─┬─────┤
                                         └─ ; ─┘

►─────┬─────────────────────────────────────┬──────────────────────────┤ 
      ├─/1\─┬─<occurs clause>───────────────┤
      │     ├─ REQUIRED ────────────────────┤
      │     └─<stored clause>───────────────┤
      └─/1\─<remap option clause>───────────┘

<field bit declaration>

──┬──────────────────┬─<field bit name>─┬───────────┬─┬───────────┬────┤
  └─ <identifier> = ─┘                  └─<comment>─┘ └─ BOOLEAN ─┘

<occurs clause>

── OCCURS <unsigned integer> ─┬─────────┬──────────────────────────────►
                              └─ TIMES ─┘

►─┬──────────────────────────────────────┬─────────────────────────────┤
  └─ DEPENDING ON ─┬─<numeric item name>─┤
                   └─<real item name>────┘

<stored clause>

── STORED ─┬─ OPTIONALLY ──────────────────────────────┬───────────────┤
           ├─ OPTIONALLY WITH ─┬─┬─<Boolean item name>─┤
           └─ DEPENDING ON ────┘ └─<field bit name>────┘

<remap option clause>

──┬─ HIDDEN ────────────────────────┬──────────────────────────────────┤
  └─ READONLY ─┬────────────────────┤
               ├─ NO EXCEPTION ─────┤
               └─ GIVING EXCEPTION ─┘

The following table describes the elements of the syntax diagram:

Option

Description

<field item name>

A field item name is an identifier that names the item. The field item name cannot exceed 30 characters.

<field bit name>

A field bit name is an identifier that names an individual bit within the item. From 1 to 48 names can appear. The word BOOLEAN is optional and serves only as a comment.

<identifier> =

The <identifier> = option can be used only when a field item is being redescribed in a remap. This option can be used to rename the individual Boolean items in the field.

Refer to the discussion under “Common Options for Data Items” later in this section for information that is common to all data item types.

The following examples illustrate the use of field data items.

Example 1

This example illustrates field data items in a data set declaration.

D DATA SET
 (
  A FIELD(8);
  B FIELD(3) OCCURS 10 TIMES;
  C FIELD(48) REQUIRED;
  F FIELD
   (
    F1 BOOLEAN;
    F2 BOOLEAN;
    F3 BOOLEAN;
   );
  G FIELD
   (
    G1;
    G2;
    G3;
   );
  DAYS-OF-WEEK FIELD
   (
    MON;
    TUE;
    WED;
    THUR;
    FRI;
   ) REQUIRED;
 );

Example 2

This example illustrates field data items in a compact data set declaration.

C COMPACT DATA SET
 (
  B BOOLEAN INITIALVALUE TRUE;
  N NUMBER(2);
  FB FIELD
   (
    FB1 BOOLEAN;
    FB2 BOOLEAN;
   );
  F FIELD(11);
  G FIELD(10) OCCURS 50 TIMES DEPENDING ON N;
  H FIELD(18) REQUIRED;
  I FIELD(32) STORED OPTIONALLY;
  J FIELD(3)  STORED OPTIONALLY WITH FB2;
  K FIELD(40) STORED DEPENDING ON B;
  S FIELD
   (
    S1 BOOLEAN;
    S2;
    S3;
   ) STORED DEPENDING ON B;
  T FIELD
   (
    T1;
    T2;
    T3;
    T4;
    T5;
    T6;
    T7;
   ) OCCURS 20 TIMES DEPENDING ON N;
);

Internal Large Objects (LOB) Data Items

Internal large object (LOB) items are used to internally store the entire data file of a binary large object (BLOB) or a character large object (CLOB). Unlike external BLOB or CLOB, you do not store the file title, and you cannot specify the item size. These LOB items can contain images, video, audio, text, and so forth.

A data set that contains an internal LOB must be an EXTENDED structure, except for remap data sets. Global items cannot be declared or defined as type INTERNAL BLOBs or INTERNAL CLOBs. You must specify the INTERNAL LOBS option in the DASDL description to define the internal LOB item in your database. Use the OCCURS clause to establish an ordered collection of internal LOB items. However, an occurring group that contains internal LOB items is not allowed. The ccsversion can be defined for an internal CLOB but not for an internal BLOB.

The size of these objects makes it impossible to hold the data within the record. New data sets, called LOB tank data sets, are added implicitly to contain LOB data. You can alter the physical options of LOB tank data sets, sets, and subsets, but you cannot alter access. Depending on the object size, the item is dynamically stored inside a small, medium, or large tank.

You can specify the COMPRESSION option for an internal BLOB or CLOB. Once it is modified, reorganization is required. The following new internal structures are added implicitly to contain LOB compressed data: COMP-LOBS, COMP-LOBS-SET, COMP-LOCATOR-SET and COMP-SPACE-SET.

If the dump list does not include all structures, then you must ensure that these structures are included in the dump list.

The following diagram illustrates the syntax for declaring an internal LOB data item:

<internal LOB data item>

──<item name>─┬───────────┬─ INTERNAL ─┬─ BLOB ─┬─────────────────────►
              └─<comment>─┘            └─ CLOB ─┘
►─┬──────────────────────────────────────────────┬─────────────────────┤   
  ├─────/1\─ COMPRESSION ────┬───────────────┬───┤
  │                          └── = ┬─ LZW ───┤   │
  │                                └─ FALSE ─┘   │
  ├─────/1\─ <occurs clause> ────────────────────┤
  └─────/1\─ CCSVERSION = <ccsversion name>──────┘   
Note: CCSVERSION can be used only with INTERNAL CLOB; it cannot be used with INTERNAL BLOB.

<occurs clause>

── OCCURS ──<unsigned integer>────────────────TIMES──────────────────────┤

The following diagram illustrates the syntax for changing the data set physical options of LOB tank structures.

 ┌◄────────────────────────────────────────────────────────────────────────┐
─┴┬─/1\─ SMALL-LOBS ──┬─(──<data set physical options of internal LOB>─); ─┴─┤
  ├─/1\─ MED-LOBS ────┤
  ├─/1\─ LARGE-LOBS ──┤
  └─/1\─ LOB-STR-DIR ─┘

The following diagram illustrates the syntax for changing the set and subset physical options of LOB tank structures:

 ┌◄───────────────────────────────────────────────────────────────────────┐
─┴┬─/1\─LOB-STR-DIR-SET ───┬─(──<set physical options of internal LOB>──);┴┤
  ├─/1\─SMALL-LOCATOR-SET ─┤
  ├─/1\─SMALL-SPACE-SET ───┤
  ├─/1\─MED-LOCATOR-SET ───┤
  ├─/1\─MED-SPACE-SET ─────┤ 
  ├─/1\─LARGE-LOCATOR-SET ─┤
  └─/1\─LARGE-SPACE-SET ───┘

<data set physical options of internal LOB>

  ┌◄───────────────────────────┬──────┬────────────────────────────┐
  │                            └◄─ , ─┘                            │
──┴─┬─/1\─ AREAS = <unsigned integer─────────────────────────────┬─┴────┤
    ├─/1\─── AREASIZE ─────  = <unsigned integer> ─┬─────────────┤
    │                                              └─ RECORDS ───┤
    ├─/1\─ <block size> ─────────────────────────────────────────┤
    ├─/1\─ <disk name> ──────────────────────────────────────────┤
    ├─/1\─ REBLOCK ─┬────────────────────────────────────────────┤
    │               └─ = ─┬─ FALSE ──────────────────────────────┤
    │                     └─ TRUE ───────────────────────────────┤
    ├─/1\─ REBLOCKFACTOR = <unsigned integer> ───────────────────┤
    ├─/1\─ SECTIONS = <unsigned integer>─────────────────────────┤
    └─/1\─ SECURITYGUARD = <file title>──────────────────────────┘         
Note: You cannot specify LOB-STR-DIR with the SECTIONS option.

<set physical options of internal LOB>

  ┌◄─────────────────────────────────────────────────────────────┐
──┴─┬─/1\─ <disk name>─────────────────────────────────────────┬─┴─────┤
    └─/1\─── SECURITYGUARD ─────  = <file title> ──────────────┘

<block size>

──── BLOCKSIZE = <unsigned integer> ─────────┬────────────────────┬────┤
                                             └─ RECORDS ──────────┘
                                             

<disk name>

──┬─ PACK ───────┬─ = ──<family name>──────────────────────────────────┤
  ├─ DISKPACK ───┤
  ├─ PACKNAME ───┤
  └─ FAMILYNAME ─┘

The following table explains the elements of the syntax diagram.

Option

Description

<item name>

An item name is an identifier that names the data item declared as an internal LOB item. The item name cannot exceed 30 characters.

AREAS and AREASIZE

The AREAS and AREASIZE options control the maximum amount of disk space allocated to a file. Refer to “AREAS and AREASIZE Options” later in this section for additional information

<block size>

The records in a data set are normally blocked. Use the BLOCKSIZE option to control the size of a block. The block size for data set physical options of an internal LOB must be specified in terms of records. The maximum value is 4095 records. Refer to “BLOCKSIZE Option” later in this section for additional information.

<disk name>

The disk name option controls the location of the data set. In the absence of any specification, the data sets are assigned to disk. Refer to “Disk/Pack Option” later in this section for additional information.

REBLOCK and REBLOCKFACTOR

The REBLOCK and REBLOCKFACTOR options enable you to optimize both random and serial access to a structure. Refer to “REBLOCK and REBLOCKFACTOR Options” later in this section for additional information.

SECTIONS

The SECTIONS option requires that the EXTENDED attribute be set to TRUE. Refer to “SECTIONS Option” later in this section for additional information.

SECURITYGUARD

The SECURITYGUARD option sets the SECURITYGUARD file attribute to the name and location of the guard file that controls direct access to the database files by programs other than the Accessroutines. Standard system security rules prevail. The following conditions can cause security errors:

  • If a nonprivileged program that is run under a nonprivileged usercode attempts to directly access the database files and is not in the guard file

  • If the guard file is not present when the database file is accessed by a nonprivileged program that runs under a nonprivileged usercode

The following table shows the default physical options for the tank data sets.

Options

SMALL-LOBS

MED-LOBS

LARGE-LOBS

AREA

999

999

999

AREASIZE

5400 records

592 records

148 records

BLOCKSIZE

10 records

4 records

2 records

POPULATION

26973000

2957040

739260

REBLOCKFACTOR

10

5

5

Record Size

110 words

1010 words

4010 words

SECTIONS

5

5

5

Example 1

The following example contains internal BLOB items and internal CLOB items.

D DATASET (
   ID NUMBER(7); 
   NAME ALPHA(30);
   FINGERPRINT INTERNAL BLOB;
   PHOTO INTERNAL BLOB OCCURS 5 TIMES;
   MOVIE INTERNAL BLOB;
   SYPNOSIS INTERNAL CLOB;
  ) EXTENDED; 

Example 2

The following example illustrates changing the physical option of the LOB structures called SMALL-LOBS, MED-LOBS, LARGE-LOBS.

D DATASET (
   ID NUMBER(7);
   NAME ALPHA(30);
   FINGERPRINT INTERNAL BLOB;
   PHOTO INTERNAL BLOB OCCURS 5 TIMES;
   MOVIE INTERNAL BLOB; 
   SYPNOSIS INTERNAL CLOB;
  ) EXTENDED;
SMALL-LOBS (PACKNAME = DMS,SECTIONS = 8, AREASIZE = 100 RECORDS);
MED-LOBS (PACKNAME = DMCP);
LARGE-LOBS (PACKNAME = DBPK1);

Numeric Data Items

Numeric items are used to store signed or unsigned fractional or integer values. Numbers are represented in 4-bit packed decimal form. Each decimal digit is converted to its binary equivalent and stored in a 4-bit digit.

Signed items contain a 4-bit packed decimal sign in the leftmost digit of the item. Negative numbers are denoted by the binary value 1101 (hexadecimal D). Any other value in the sign digit indicates the number is positive. Numeric items are aligned on 4-bit digit boundaries.

The following diagrams illustrate the syntax for declaring a numeric item:

<numeric data item>

──<numeric item name>─┬───────────┬─ NUMBER ───────────────────────────►
                      └─<comment>─┘

►─ ( ─┬─────┬─<precision>─┬────────────────────┬─ ) ───────────────────►
      └─ S ─┘             └─ , <scale factor> ─┘

►─┬────────────────────────────────────────────────────┬───────────────┤
  │ ┌◄────────────────────── , ──────────────────────┐ │
  └─┴─┬─/1\─ DIGITCHECK ─┬─────────────────────────┬─┴─┘
      │                  ├─ IS ─┬─┬─ FALSE ────────┤
      │                  └─ = ──┘ └─ TRUE ─────────┤
      ├─/1\─ DATAENCRYPT ─┬────────────────────────┤
      │                   └─ = ──┬─ FALSE ─────────┤
      │                          └─ TRUE ──────────┤
      ├─/1\─ DATAMASK ─┬───────────────────────────┤
      │                └─ = ──┬─ TRUE ─────────────┤
      │                       └─ FALSE ────────────┤
      ├─/1\─ INITIALVALUE ─┬──────┬─┬─ HIGH-VALUE ─┤
      │                    ├─ IS ─┤ ├─ LOW-VALUE ──┤
      │                    └─ = ──┘ ├─<integer>────┤
      │                             └─<number>─────┤
      ├─/1\─ NULL ─┬──────┬─┬─ HIGH-VALUE ─────────┤
      │            ├─ IS ─┤ ├─ LOW-VALUE ──────────┤
      │            └─ = ──┘ ├─<integer>────────────┤
      │                     └─<number>─────────────┤
      ├─/1\─┬─<occurs clause>──────────────────────┤
      │     ├─ REQUIRED ───────────────────────────┤
      │     └─<stored clause>──────────────────────┤
      └─/1\─<remap option clause>──────────────────┘

<occurs clause>

── OCCURS <unsigned integer> ─┬─────────┬──────────────────────────────►
                              └─ TIMES ─┘

►─┬──────────────────────────────────────┬─────────────────────────────┤
  └─ DEPENDING ON ─┬─<numeric item name>─┤
                   └─<real item name>────┘

<stored clause>

── STORED ─┬─ OPTIONALLY ──────────────────────────────┬───────────────┤
           ├─ OPTIONALLY WITH ─┬─┬─<Boolean item name>─┤
           └─ DEPENDING ON ────┘ └─<field bit name>────┘

<remap option clause>

──┬─ HIDDEN ────────────────────────┬──────────────────────────────────┤
  └─ READONLY ─┬────────────────────┤
               ├─ NO EXCEPTION ─────┤
               └─ GIVING EXCEPTION ─┘

The following table describes the elements of the syntax diagram:

Option

Description

<numeric item name>

A numeric item name is an identifier that names the item. The numeric item name cannot exceed 30 characters.

<precision>, <scale factor>

The precision specifies the total number of numeric digits in the item. The scale factor specifies the number of digits to the right of the decimal point. The precision and scale factor must be unsigned integers. When the letter S appears before the precision, the item includes a sign. The digit allocated for the sign is not counted in the precision; thus, the sign increases the size of the item by one digit. The maximum precision for unsigned items is 23 and for signed items is 22. The scale factor must not exceed the precision.

DIGITCHECK

The Enterprise Database Server guarantees that a numeric item contains correctly formed packed decimal values if the DIGITCHECK option is set.

DATAENCRYPT

The DATAENCRYPT option enables you to encrypt specific data items within an Enterprise Database Server database. This prevents any kind of tool that can read files from a disk from accessing the data in clear text.

If a record contains an item with the DATAENCRYPT option set, its record size is larger than normal due to the encryption algorithm.

An item that specifies the DATAENCRYPT option cannot be used with the following conditions or clauses:

  • WHERE condition

  • SELECT condition

  • STORED DEPENDING ON clause

  • OCCURS DEPENDING ON clause

If there are any items with the DATAENCRYPT option in the data set, these items will be encrypted and moved to the end of the record. This is done to maximize the performance and minimize the disk usage. The record size will be increased and the size will depend on the encryption algorithm specified. The encrypted data will always be different in each record even if the records contain the same original (unencrypted) value.

 

If there are any Filler data items along with the items with DATAENCRYPT option in the data set, the Filler in the record is located after all non-encrypted data items and encrypted data items. When substituting a filler item with new data items type, a reorganization is required.

A reorganization must be performed when changing the DATAENCRYPT option from TRUE to FALSE or FALSE to TRUE.

The key items in a set or subset can have the DATAENCRYPT option specified but not the key items in an Access. The key data cannot contain encrypted data items. For more information about using the DATAENCRYPT option with key items, refer to Sets, Subsets, and Accesses.

DATAMASK

The DATAMASK option enables you to obscure or ~de-identify specific data within an Enterprise Database Server database ensuring the data security is maintained, and sensitive customer information is not leaked outside of authorized environments. The DATAMASK option is not allowed for restart data sets, internal structures, or partitioned data sets. Only alpha, numeric, and real data item types are valid for data masking. The reserved internal items with type alpha such as GEMCOS are not allowed for data masking. To change the CCSVERSION option to an item with the DATAMASK option set, the DATAMASK option must be reset first before changing the CCSVERSION option. This process requires two separate DASDL updates. The size of the item with type Numeric must be greater than 1.

For adding a new group item, DATAMASK items can only be specified for individual items within the group. This process requires two separate DASDL updates. The first DASDL update is to add the group item, this update requires a database reorganization. The second DASDL update enables the setting of the DATAMASK option to individual item(s) within the group item. At the end, an additional compilation is required. A reorganization must be performed when changing the DATAMASK option from TRUE to FALSE, or FALSE to TRUE.

Key or key data cannot have the DATAMASK option specified.

An item specified with the DATAMASK option cannot be used with the WHERE or SELECT condition.

Refer to the discussion under “Common Options for Data Items” later in this section for information that is common to all data item types.

The following examples illustrate the use of numeric data items.

Example 1

This example illustrates the use of numeric data items in a data set declaration. The ~item W occupies five digits and contains an integer. The item X occupies seven digits with five places to the left of the decimal point and two to the right. Seven digits are allocated for the item Y. The sign is located in the leftmost digit and is followed by six decimal digits. Three digits precede the decimal point and three follow it. The item Z uses 23 digits, all of which are to the right of the decimal place.

D DATA SET
 (
  N1 NUMBER(5);
  N2 NUMBER(S7,2) INITIALVALUE IS 0;
  N3 NUMBER(6,3)  NULL IS LOW-VALUE, REQUIRED;
  N4 NUMBER(7)    OCCURS 10 TIMES, INITIALVALUE IS 1;
  W NUMBER(5);
  X NUMBER(7,2);
  Y NUMBER(S6,3);
  Z NUMBER(23,23);
 );

Example 2

This example illustrates the use of numeric data items in a compact data set declaration.

C COMPACT DATA SET
 (
  B BOOLEAN INITIALVALUE TRUE;
  F FIELD
   (
    F1 BOOLEAN;
    F2 BOOLEAN;
   );
  N NUMBER(3);
  S NUMBER(S7,2) NULL IS HIGH-VALUE,
                 INITIALVALUE IS 0;
  T NUMBER(9)    OCCURS 10 TIMES;
  U NUMBER(5,5)  OCCURS 20 TIMES DEPENDING ON N;
  V NUMBER(7)    NULL IS 0, REQUIRED;
  W NUMBER(9,3)  STORED OPTIONALLY WITH F1;
  X NUMBER(12,3) STORED DEPENDING ON B,
                 INITIALVALUE IS 0;
 );

Real Data Items

Real items are used to store signed or unsigned fractional or integer values. Values are represented in single-precision floating point form. The size of a real item is one word (twelve 4-bit digits) regardless of precision or scale factor. Real items are aligned on 8-bit byte boundaries.

The following diagrams illustrate the syntax for declaring real items:

<real data item>

──<real item name>─┬───────────┬─ REAL ────────────────────────────────►
                   └─<comment>─┘

►─┬────────────────────────────────────────────────────┬───────────────►
  └─ ( ─┬─────┬─<precision>─┬────────────────────┬─ ) ─┘
        └─ S ─┘             └─ , <scale factor> ─┘

►─┬────────────────────────────────────────────────────┬───────────────┤
  │ ┌◄────────────────────── , ──────────────────────┐ │
  └─┴─┬─/1\─ INITIALVALUE ─┬──────┬─┬─ HIGH-VALUE ─┬─┴─┘
      │                    ├─ IS ─┤ ├─ LOW-VALUE ──┤
      │                    └─ = ──┘ ├─<integer>────┤
      │                             └─<number>─────┤
      ├─/1\─ DATAENCRYPT ─┬────────────────────────┤
      │                   └─ = ──┬─ TRUE ──────────┤
      │                          └─ FALSE ─────────┤
      ├─/1\─ DATAMASK ─┬───────────────────────────┤
      │                └─ = ──┬─ TRUE ─────────────┤
      │                       └─ FALSE ────────────┤
      ├─/1\─ NULL ─┬──────┬─┬─ HIGH-VALUE ─────────┤
      │            ├─ IS ─┤ ├─ LOW-VALUE ──────────┤
      │            └─ = ──┘ ├─<integer>────────────┤
      │                     └─<number>─────────────┤
      ├─/1\─┬─<occurs clause>──────────────────────┤
      │     ├─ REQUIRED ───────────────────────────┤
      │     └─<stored clause>──────────────────────┤
      ├─/1\─<remap option clause>──────────────────┤
      └─/1\─<GEMCOS clause>────────────────────────┘

<occurs clause>

── OCCURS <unsigned integer> ─┬─────────┬──────────────────────────────►
                              └─ TIMES ─┘

►─┬──────────────────────────────────────┬─────────────────────────────┤
  └─ DEPENDING ON ─┬─<numeric item name>─┤
                   └─<real item name>────┘

<stored clause>

── STORED ─┬─ OPTIONALLY ──────────────────────────────┬───────────────┤
           ├─ OPTIONALLY WITH ─┬─┬─<Boolean item name>─┤
           └─ DEPENDING ON ────┘ └─<field bit name>────┘

<remap option clause>

──┬─ HIDDEN ────────────────────────┬──────────────────────────────────┤
  └─ READONLY ─┬────────────────────┤
               ├─ NO EXCEPTION ─────┤
               └─ GIVING EXCEPTION ─┘

<GEMCOS clause>

──┬─ GEMCOS-LITERAL ─┬─────────────────────────────────────────────────┤
  ├─ GEMCOS-DATA ────┤
  ├─ GEMCOS-DBSN ────┤
  ├─ GEMCOS-SSN ─────┤
  ├─ COMS-PROGRAM ───┤
  ├─ COMS-LOCATOR ───┤
  └─ COMS-OUTPQ ─────┘

The following table describes the elements of the syntax diagram:

Option

Description

<real item name>

A real item name is an identifier that names the item. The real item name cannot exceed 30 characters.

<precision>, <scale factor>

The precision and scale factor are optional. They only affect the way the item is declared and accessed in host language programs. The precision and scale factor do not affect the space allocated for the item, the form in which numbers are represented, or the range of values that can be stored.

The precision specifies the total number of numeric digits in the item. The scale factor specifies the number of digits to the right of the decimal point. The precision and scale factor must be unsigned integers. When the letter S appears before the precision, the item includes a sign. The maximum precision for unsigned items is 12 and for signed items is 11. The scale factor must not exceed the precision.

DATAENCRYPT

The DATAENCRYPT option enables you to encrypt specific data items within an Enterprise Database Server database. This prevents any kind of tool that can read files from a disk from accessing the data in clear text.

If a record contains an item with the DATAENCRYPT option set, its record size is larger than normal due to the encryption algorithm.

An item that specifies the DATAENCRYPT option cannot be used with the following conditions or clauses:

  • WHERE condition

  • SELECT condition

  • STORED DEPENDING ON clause

  • OCCURS DEPENDING ON clause

If there are any items with the DATAENCRYPT option in the data set, these items will be encrypted and moved to the end of the record. This is done to maximize the performance and minimize the disk usage. The record size will be increased and the size will depend on the encryption algorithm specified. The encrypted data will always be different in each record even if the records contain the same original (unencrypted) value.

If there are any Filler data items along with the items with DATAENCRYPT option in the data set, the Filler in the record is located after all non-encrypted data items and encrypted data items. When substituting a filler item with new data items type, a reorganization is required.

A reorganization must be performed when changing the DATAENCRYPT option from TRUE to FALSE or FALSE to TRUE.

The key items in a set or subset can have the DATAENCRYPT option specified but not the key items in an Access. The key data cannot contain encrypted data items. For more information about using the DATAENCRYPT option with key items, refer to Sets, Subsets, and Accesses.

DATAMASK

The DATAMASK option enables you to obscure or ~de-identify specific data within an Enterprise Database Server database ensuring the data security is maintained, and sensitive customer information is not leaked outside of authorized environments. The DATAMASK option is not allowed for restart data sets, internal structures, or partitioned data sets. Only alpha, numeric, and real data item types are valid for data masking. The reserved internal items with type alpha such as GEMCOS are not allowed for data masking. The size of the item with type Numeric must be greater than 1. To change the CCSVERSION option to an item with the DATAMASK option set, the DATAMASK option must be reset first before changing the CCSVERSION option. This process requires two separate DASDL updates. For adding a new group item, DATAMASK items can only be specified for individual items within the group. This process requires two separate DASDL updates. The first DASDL update is to add the group item, this update requires a database reorganization. The second DASDL update enables the setting of the DATAMASK option to individual item(s) within the group item. At the end, an additional compilation is required. A reorganization must be performed when changing the DATAMASK option from TRUE to FALSE, or FALSE to TRUE.

Key or key data cannot have the DATAMASK option specified.

An item specified with the DATAMASK option cannot be used with the WHERE or SELECT condition.

Refer to the discussion under “Common Options for Data Items” later in this section for information that is common to all data item types.

The following examples illustrate the use of the real data item.

Example 1

This example illustrates the use of real data items in a data set declaration.

X DATA SET
 (
  A REAL;
  B REAL(S7,2) INITIALVALUE 147.56;
  C REAL(9)    NULL IS LOW-VALUE, REQUIRED;
  D REAL(11,3) OCCURS 10 TIMES, INITIALVALUE 0;
 );

Example 2

This example illustrates the use of real data items in a compact data set declaration.

C COMPACT DATA SET
 (
  B BOOLEAN INITIALVALUE TRUE;
  N NUMBER(3);
  S REAL;
  T REAL(S7,2) NULL IS 0, INITIALVALUE IS 1;
  U REAL(10)   OCCURS 10 TIMES;
  V REAL       OCCURS 20 TIMES DEPENDING ON N;
  W REAL(8,2)  STORED OPTIONALLY;
  X REAL       STORED DEPENDING ON B;
 );

Time Data Items

Time data items are used to store a time value. Information is stored in the format supported by the function INTEGER_OF_TIME(X) in ALGOL or INTEGER-OF-TIME(X) in COBOL85, where X must be an integer in the form HHMMSSFF. The range starts from midnight. An initial value can be specified in the format of HHMMSSFF where H is hour, M is minute, S is second, and F is fractional second.

ALGOL applications that access time data items require the following INCLUDE statement:

$ INCLUDE = “SYMBOL/INTL/ALGOL/DMS/PROPERTIES.” 10000000-89999999

Refer to the following documents for additional information and examples for ALGOL and COBOL usage of the time data item:

  • Interpretive Interface Programming Reference Manual

  • Application Program Interfaces Programming Guide

  • ALGOL Programming Reference Manual, Volume 1

  • COBOL ANSI-85 Programming Reference Manual, Volume 1

The SLICESUPPORT library is declared in *SYMBOL/INTL/ALGOL/PROPERTIES. If you declare this library in your program, you need to remove the library declaration.

The following diagram illustrates the syntax for declaring time data items:

<time data item>

── <time item name> ──── TIME──┬─────────────────────────────────────┬────┤
                               ├─ <1> INITIALVALUE ─┬─ = ─┬─<number>─┤
                               │                    └ IS ─┘          │
                               ├─ <1> DATAMASK ─┬───────────┬────────┤
                               │                └ = ┬──TRUE─┤        │ 
                               │                    └─ FALSE┘        │     
                               ├─ <1> REQUIRED ──────────────────────┤
                               └─ <1> <remap option clause> ─────────┘

The following examples illustrate the use of time data items

Example 1

This example illustrates the use of a time item in a data set declaration. The item TRTIME contains a binary integer.

D DATA SET
 (
  N1 NUMBER(5);
  N2 NUMBER(S7,2) INITIALVALUE IS 0;
  TRTIME TIME;
  );

Example 2

This example illustrates the use of a time item in a data set declaration with an initial value assigned. The item TRTIME contains a binary integer.

D DATA SET
  (
   N1 NUMBER(5);
   N2 NUMBER(S7,2) INITIALVALUE IS 0;
   TRTIME TIME INITIALVALUE IS 08000000;   %%08:00:00:00
    );

Timestamp Data Items

The timestamp data item is a representation of the TIME(206) ALGOL intrinsic function. Timestamp is stored as a binary floating point with a size of 12 digits. However, Enterprise Database Server does not provide any validation of the data to conform to the TIME(206) format. Currently, it is any real value.

An item with the timestamp data type is not allowed to be used as a key, key data or with the WHERE or SELECT condition.

ALGOL applications that access timestamp data items require the following INCLUDE statement:

   $ INCLUDE = "SYMBOL/INTL/ALGOL/DMS/PROPERTIES." 10000000-89999999

Refer to the following documents for additional information and examples for ALGOL and COBOL usage of the date data item:

  • Interpretive Interface Programming Reference Manual

  • Application Program Interfaces Programming Guide

  • ALGOL Programming Reference Manual, Volume 1

  • COBOL ANSI-85 Programming Reference Manual, Volume 1

The SLICESUPPORT library is now declared in *SYMBOL/INTL/ALGOL/PROPERTIES. If you declare this library in your program, you need to remove the library declaration.

The following diagram illustrates the syntax for declaring timestamp data items.

<timestamp data item>

────<timestamp item name> ── TIMESTAMP ─────────────────────────────┤

The following example illustrates the use of timestamp data items.

Example 1

This example illustrates the use of a timestamp item in a data set declaration. The item TRTIMESTAMP occupies 12 digits and contains a binary float.

D DATA SET
 (
  N1 NUMBER(5);
  N2 NUMBER(S7,2) INITIALVALUE IS 0;
  TRTIMESTAMP TIMESTAMP;
  );

Common Options for Data Items

The following elements appear in the syntax diagrams for data items:

  • INITIALVALUE option

  • NULL option

  • Occurs clause

  • Remap option clause

  • REQUIRED keyword

  • Size clause

  • Stored clause

  • GEMCOS clause

Each of these elements is described under its own heading in the following text.

Using the INITIALVALUE Option

The INITIALVALUE option is used to assign a value to a newly created item. Data items within data sets are initialized only when a user program does a CREATE operation or when a user performs a reorganization.

The initial values that can be assigned to an item depend on the data type of the item. Assigning Initial Values to Data Items discusses the assignment of initial values.

Table 6. Assigning Initial Values to Data Items

Data Type

Allowable Initial Value

Description

Alpha

BLANKS, HIGH‑VALUE, LOW‑VALUE, or string

A setting of HIGH-VALUE turns all bits on.

A setting of LOW-VALUE turns all bits off.

If a string is specified, the following rules apply:

  • The length of the string must not exceed the length of the alpha item.

  • If the string and alpha item are the same length, then the string is used as the initial value.

  • If the string contains more than 6 characters and is shorter than the alpha item, then the string is left-justified in the item and the remainder of the item is filled with all bits turned on.

  • If the string contains 6 characters or less and is shorter than the alpha item, then the string is repeated as many times as necessary to fill one 6-character word. The resulting word is used as follows:

    • If the length of the alpha item is 6 characters or less, then the leftmost characters in the word are assigned to the item.

    • If the alpha item is greater than 6 characters in length, then the contents of the word are repeated, word by word, to fill the entire item.

In the following example, A is initialized to "ABCDEFGHIJKLMN". B is initialized to "ABCDEFG" followed by seven characters with all bits turned on. C is initialized to "ABCABCABCABCAB". D is initialized to "ABCDABABCDABAB". E is initialized to "ABABA".

D DATA SET
(
 A ALPHA(14) INITIALVALUE 
	  "ABCDEFGHIJKLMN";
 B ALPHA(14) INITIALVALUE "ABCDEFG";
 C ALPHA(14) INITIALVALUE "ABC";
 D ALPHA(14) INITIALVALUE "ABCD";
 E ALPHA(5) INITIALVALUE "AB";
);

Boolean

FALSE (0) or TRUE (1)

 

Field

Not applicable

Field items cannot be assigned an initial value; they receive default initial values.

Numeric and real

HIGH-VALUE, LOW‑VALUE, integer, or number

For numeric items, HIGH-VALUE is the value with all bits turned on. For real items with a precision, HIGH-VALUE is the largest integer value that can be represented; while for real items without a precision, it is the largest real value that can be represented. LOW‑VALUE is decimal zero for both numeric items and real items. When an integer or number is specified, its value must be within the range of values permitted by the precision and scale factor of the item.

The following example illustrates the setting of initial values for numeric and real data items:

X DATA SET
 (
  A REAL INITIALVALUE HIGH-VALUE;
  B NUMBER(S5,2) INITIALVALUE -123.45;
  D REAL(S5,2) INITIALVALUE -1.2;
  E NUMBER(S5,2) INITIALVALUE -0.12;
  F REAL(S5,2) INITIALVALUE 12;
  G REAL(5) INITIALVALUE 12345;
  H REAL(5,5) INITIALVALUE .12345;
 );

External binary large object (BLOB)/character large object (CLOB)

String

The following rules apply:

  • A string must contain the name of the LOB file.

  • The length of the string must not exceed the length of the external BLOB or CLOB item.

  • If the string and the external BLOB or CLOB item are the same length, the string is used as the initial value.

  • If the string contains more than 6 characters and is shorter than the external LOB item, the string is left‑justified in the item and the remainder of the item is filled, with all bits turned on.

  • If the string contains 6 characters or less and is shorter than the external LOB item, the string is repeated as many times as necessary to fill one 6-character word. The resulting word is used as follows:

    • If the length of the external LOB item is 6 characters, the leftmost characters in the word are assigned to the item.

    • If the length of the external LOB item is greater than 6 characters, the contents of the word are repeated, word by word, to fill the entire item.

In the following example, A is initialized to "C:\BLOB\AB.GIF." B is initialized to " followed by 2 characters with all bits turned on. C is initialized to "C:\C:\C:\C:\C:\." D is initialized to "D:\D:"

D DATA SET
 (
  A EXTERNAL BLOB(14) INITIALVALUE 
			"C:\BLOB\AB-GIF";
  B EXTERNAL CLOB(14) INITIALVALUE 
			"D:\NOST1\DEMO";
  C EXTERNAL BLOB(14) INITIALVALUE 
			"C:\";
  D EXTERNAL CLOB(14) INITIALVALUE 
			"D:\";
 );


Understanding the Initial Values for Occurring Items

Initial values can be specified for occurring items. Each occurrence of the item is initialized to the specified value.

Understanding the Default Initial Values

An initial value need not be explicitly specified for each item. By default, DASDL assigns the following initial values:

  • The initial value designated in a remap record description. This value is used only for records that are created using the remap facility.

  • The initial values designated in a data set record description.

  • The initial value designated in an item default statement.

  • The NULL value designated when the item is declared.

  • If none of the preceding default values can be used, then a system-supplied default value is assigned to the item. The initial value assigned to the item depends on the item type and on whether the item is an occurring or a nonoccurring item. System‑Supplied Default Initial Values describes the system-supplied default values.

Table 7. System‑Supplied Default Initial Values

Item Type

Initial Value for Nonoccurring Items

Initial Value for Occurring Items

Alpha

HIGH-VALUE

HIGH-VALUE

Boolean

FALSE

TRUE

External BLOB or CLOB

HIGH-VALUE

HIGH-VALUE

Field

LOW-VALUE

HIGH-VALUE

Internal BLOB or CLOB

HIGH-VALUE

HIGH-VALUE

Numeric

HIGH-VALUE

HIGH-VALUE

Real

HIGH-VALUE

HIGH-VALUE


Examples of Assigning Initial Values

The following examples illustrate the assigning of initial values to data items.

Example 1

Item A is initialized to ABC, item B is initialized to XYZ, and item C is initialized to HIGH‑VALUE.

D DATA SET
 (
  A  ALPHA(3) INITIALVALUE "ABC",NULL "XYZ";
  B  ALPHA(3) NULL "XYZ";
  C  ALPHA(3);
 );

Example 2

The items F1 and F2 are initialized to FALSE, while items G1 and G2 are initialized to TRUE.

D DATA SET
 (
  A ALPHA(3);
  F FIELD
   (
    F1 BOOLEAN;
    F2 BOOLEAN;
   );
  G FIELD
   (
    G1;
    G2;
   ) OCCURS 5 TIMES;
 );

Example 3

The item F is initialized to all bits off (decimal 0), and all 10 occurrences of item G are initialized to all bits on (decimal 31).

D DATA SET
 (
  F FIELD(9);
  G FIELD(5) OCCURS 10 TIMES;
  A ALPHA(3);
 );

Example 4

All occurrences of item A are initialized to ABC, all occurrences of item B are initialized to TRUE, and all occurrences of item N are initialized to –123. Item X is initialized to HIGH‑VALUE.

D DATA SET
 (
  A ALPHA(3)   OCCURS 4 TIMES,
                 INITIALVALUE "ABC";
  B BOOLEAN    OCCURS 7 TIMES
                 INITIALVALUE TRUE;
  N NUMBER(S4) OCCURS 10 TIMES
                 INITIALVALUE -123;
  X ALPHA(3);
 );

Using the NULL Option

The NULL option specifies the value present in items which do not contain valid information. The NULL option is used in the following ways:

  • A user program can assign a null value to an item.

  • A user program can test if an item contains a null value.

  • The database administrator can ensure an item is assigned a value by making the item required. When a user program stores a record in the database, the system examines the record. If a required item contains a null value, the record is not stored and the user program storing the record receives an exception.

  • If the initial value option does not appear, the system assigns a null value as the initial value.

  • A null value is used in conjunction with the stored clause to determine which items are stored on disk.

Assigning Null Values to Data Items describes which data items can be assigned null values.

Table 8. Assigning Null Values to Data Items

Data Type

Allowable Values

Description

Alpha or External BLOB or CLOB

BLANKS, HIGH‑VALUE, LOW‑VALUE, or string

An assignment of HIGH-VALUE turns all bits on. An assignment of LOW‑VALUE turns all bits off. When a string is specified, the length of the string must not exceed the length of the alpha or external LOB item. If the string and alpha or external LOB item are the same length, the string is used as the null value. The following conditions also affect the null value:

  • If the string contains more than 6 characters and is shorter than the alpha item, then the string is left-justified and padded with all bits turned on to form the null value.

  • If the string contains 6 characters or less and is shorter than the alpha or external LOB item, the string is repeated as many times as necessary to fill one 6‑character word. The resulting word is used as follows:

    • If the length of the alpha or external LOB item is 6 characters or less, the leftmost characters in the word are used as the null value.

    • If the length of the alpha or external LOB item is greater than 6 characters, the contents of the word are repeated, word by word, to form the null value.

In the following example, item A is assigned the null value ABCDEFGHIJKLMN. Item B is assigned the null value ABCDEFG followed by seven characters with all bits turned on. Item C has a null value of ABCABCABCABCAB. Item D has a null value of ABCDABABCDABAB. Item E has a null value of ABABA. Item F has a null value of C:\BLOB\AB.GIF. Item G is assigned the null value \\HOST1\DEMO followed by 2 characters with all bits turned on. Item H has a null value of C:\C:\C:\C:\C:. Item I has a null value of D:\D:.

D DATA SET
 (
  A  ALPHA(14) NULL
     "ABCDEFGHIJKLMN";
  B  ALPHA(14) NULL
     "ABCDEFG";
  C  ALPHA(14) NULL
     "ABC";
  D  ALPHA(14) NULL
     "ABCD";
  E  ALPHA(5) NULL "AB";
  F  EXTERNAL BLOB(14) NULL
     "C:\BLOB\AB.GIF";
  G  EXTERNAL CLOB(14) NULL \\HOST1\DEMO;
  H  EXTERNAL CLOB(14) NULL"C:\";
  I  EXTERNAL CLOB(5) NULL "D:\";
 );

Boolean and field

FALSE (0) or TRUE (1)

Boolean items and field items cannot have null values.

Numeric and real

HIGH-VALUE, LOW-VALUE, integer, or number

For numeric items, HIGH-VALUE is the value with all bits turned on. For real items with a precision, HIGH-VALUE is the largest integer value that can be represented; while for real items without a precision, it is the largest real value that can be represented.

LOW-VALUE is decimal zero for both numeric items and real items.

When an integer or number is specified, its value must be within the range of values permitted by the precision and scale factor of the item.

The following example illustrates setting null values for number items:

X DATA SET
 (
  A NUMBER(S6,2)
   NULL HIGH-VALUE;
  B NUMBER(S6,2)
   NULL LOW-VALUE;
  C NUMBER(S6,2)
   NULL -1234.56;
  D NUMBER(S6,2)
   NULL +1.2;
  E NUMBER(S2,2)
   NULL -.12;
  F NUMBER(2)
   NULL 12;
  G NUMBER(S6,2);
  H NUMBER(S6,2)
   OCCURS 10 TIMES;
 );


Understanding the Default Null Value

Item declarations which do not include a NULL specification are assigned a default null value based upon their item type. By default, occurring and nonoccurring alpha, numeric, and real items are assigned a HIGH-VALUE null value.

Boolean items and field items cannot be assigned null values. In addition, NULL specifications cannot be made for global items or occurring items.

Using the Occurs Clause

The occurs clause is used to establish an ordered collection of items, all of which have identical attributes. The unsigned integer following the occurs clause controls the number of times the item is repeated. The value of the unsigned integer must not exceed 1023. Whenever the occurring item is referenced, its name must be followed by a subscript enclosed within parentheses. Valid subscripts range from 1 to the value of the unsigned integer.

Items using the occurs clause must not be keys, key data, or the object of the VERIFY ON clause for verified links. The null and required options must not be used with occurring items.

Two forms of the occurs clause are provided:

  • OCCURS <unsigned integer> TIMES

  • OCCURS <unsigned integer> TIMES DEPENDING ON item-name

    Note: You cannot set the DATAENCRYPT option for items that use the OCCURS DEPENDING ON clause.

When the DEPENDING ON clause does not appear, the amount of space the item occupies is fixed. Space is allocated for each occurrence, whether it contains a value.

For example, the following data set definition illustrates an occurs clause:

D DATA SET
 (
  A ALPHA(3);
  R REAL OCCURS 15 TIMES;
 );

The DEPENDING ON clause is used to conserve disk space. The user work area always contains a fully expanded version of the record; however, the record is compacted when it is stored on disk. The item following the words DEPENDING ON controls the number of occurrences of the item which are stored. Extra processor time is required to compact the record when it is stored and to expand the record when it is retrieved.

When a record is created, the occurring item and the numeric item following the DEPENDING ON clause are initialized normally. When the record is stored, the value of the numeric item following the DEPENDING ON clause is examined. The number of occurrences stored on disk is the number contained in the numeric item or the maximum defined in the DASDL description, whichever is smaller. If N occurrences are to be stored, the first N occurrences of the item are moved to the system buffer and then to disk. If the value of the numeric item is 0 (zero), no occurrences are stored. When a record is retrieved, the occurrences stored on disk are moved to the user work area, and the remaining occurrences in the user work area are initialized to their null value.

No data compaction results if the OCCURS DEPENDING ON clause is used outside compact data sets or in remaps. COBOL programs use the depending item for index checking. The item using the DEPENDING ON clause cannot be used with the DATAMASK option. The item following the DEPENDING ON clause must be a non-subscripted numeric item or a real item with no fractional part, and cannot be a masked item. It must contain a positive integer. The system automatically makes the item required. The item can be used as a record key. Several items using the occurs or size clauses can depend on a single numeric item. The declaration of the numeric item must precede the declaration of the occurring item, but need not be adjacent to it.

The following examples illustrate uses of the occurs clause.

Example 1

If item N contains the value 30, the first 30 occurrences of item A are stored on disk. The remaining 70 occurrences are not stored and contain null values when the record is retrieved.

D COMPACT DATA SET
 (
  N  NUMBER(3);
  A  ALPHA(20) OCCURS 100 TIMES DEPENDING ON N;
 );

Example 2

In this example, the number of occurrences of A, R, and F that are stored on disk are dependent on the value of N.

C COMPACT DATA SET
 (
  N NUMBER(3);
  A ALPHA(100) SIZE DEPENDING ON N;
  R NUMBER(S5,2) OCCURS 100 TIMES DEPENDING ON N;
  F FIELD
   (
    F1;
    F2;
    F3;
    F4;
   ) OCCURS 100 TIMES DEPENDING ON N;
 );

Using the Remap Option Clause

Remap option clauses are only used when a data item is being redescribed in a remap. The remap options are described in Using Remaps and Logical Databases for Security and Data Independence.

Using the REQUIRED Keyword

The database administrator can ensure that an item is assigned a value by making the item required. When a record is stored in the data set, the system tests all required items. If a required item contains a null value, the program doing the store operation receives an exception and the record is not stored.

Items become required in two ways. Items that include the REQUIRED keyword are explicitly required. Other items are implicitly required because of the function they serve in the database. Explicitly and implicitly required items are handled identically. The following items are implicitly required:

  • Items that are keys of a set, subset, or Access

  • Items that are the object of the OCCURS DEPENDING ON clause or SIZE DEPENDING ON clause

  • Items that are contained in groups for which REQUIRED is specified

  • Items that are contained in a data set that specifies REQUIRED ALL

  • Items that appear in an aggregate item expression

The REQUIRED keyword cannot be used with global items or when the occurs or stored clauses are specified. Specifying REQUIRED ALL for the data set does not make an occurring item required.

The following examples illustrate the use of the REQUIRED keyword.

Example 1

The system ensures that the value of item F is not 0 (zero) and that item N does not contain HIGH-VALUE.

D DATA SET
 REQUIRED ALL
 (
  F FIELD(15);
  N NUMBER(S5,2) NULL HIGH-VALUE;
 );

Example 2

One or more of the Boolean items contained in item F must be true when the record is stored.

D DATA SET
 (
  F FIELD
   (
    F1 BOOLEAN;
    F2 BOOLEAN;
    F3 BOOLEAN;
    F4 BOOLEAN;
    F5 BOOLEAN;
   )REQUIRED;
 );

Using the Size Clause

The size clause is used to conserve disk space when storing varying length alpha information. The user work area always contains a fully expanded version of the record; however, the record is compacted when it is stored on disk. The system automatically compacts records by eliminating unused space at the end of varying length items. Extra processor time is required to compact the record when it is stored and to expand the record when it is retrieved.

Alpha items which include the size clause cannot be keys, key data, or the object of the VERIFY ON clause for verified links. The option can be used only with items declared in compact data sets.

The following three forms of the size clause are available:

  • SIZE VARYING

  • SIZE VARYING WITH

  • SIZE DEPENDING ON

    Note: You cannot set the DATAENCRYPT option for items that use the SIZE DEPENDING ON clause.

The SIZE VARYING option causes trailing blanks to be discarded when the record is stored on disk. When the record is retrieved, the information stored on disk is moved to the user work area and trailing blanks are restored. For example:

D COMPACT DATA SET
 (
  A  ALPHA(100) SIZE VARYING;
 );

The SIZE VARYING WITH option is similar to the SIZE VARYING option. Like the SIZE VARYING option, the SIZE VARYING WITH option causes trailing blanks to be eliminated. Unlike the SIZE VARYING option, the SIZE VARYING WITH option causes the system to compute the length of the information in the alpha item and store this value in the numeric item following the WITH keyword.

When a record is created, the alpha and numeric items are initialized normally. When the record is stored, the system computes the length of the information in the alpha item by counting all characters up to and including the last nonblank character. The system stores this length in the appropriate numeric item in the system buffer. The value of the numeric item in the user work area is not updated. The user must perform a find current operation if the new value of the numeric item is required. User programs can alter the value of the numeric item, but this has no effect on the amount of information stored on disk. When the record is retrieved, the information stored on disk is moved to the user work area, trailing blanks are restored, and the length of the stored information is placed in the numeric item.

The item following the VARYING WITH clause must be a nonsubscripted numeric item or real item with no fractional part. It cannot be a key or key data, and it must not appear in a SELECT, VERIFY, or WHERE condition. The numeric item must be associated with only one variable item. The declaration of the numeric item must precede the declaration of the alpha item, but need not be adjacent to it. For example:

D COMPACT DATA SET
 (
  L  NUMBER(3);
  A  ALPHA(100) SIZE VARYING WITH L;
 );

When SIZE DEPENDING ON is specified, the number of characters stored on disk is controlled by the user through the numeric item following the DEPENDING ON element.

When a record is created, the alpha and numeric items are initialized normally. When the record is stored, the value of the numeric item is examined. This value or the length defined in the DASDL, whichever is smaller, controls the number of characters stored. The system does not examine the characters in the alpha item, only the value of the numeric item is significant. If N characters are to be stored, the first N characters of the alpha item are moved to the system buffer and then to disk. If the value of the numeric item is 0 (zero), no characters are stored. When the record is retrieved, the information in the alpha item is left-justified and any remaining character positions are filled with blanks.

The item using the VARYING WITH clause cannot be used with the DATAMASK option. The item following the DEPENDING ON clause must be a non-subscripted numeric item or a real item with no fractional part, and cannot be a masked item. It must contain a positive integer. The item is automatically made required. The numeric item can be used as a record key. Several items using the occurs or size clauses can depend on a single numeric item. The declaration of the numeric item must precede the declaration of the alpha item, but need not be adjacent to it. For example:

D COMPACT DATA SET
 (
  L  NUMBER(3);
  A  ALPHA(100) SIZE DEPENDING ON L;
  B  ALPHA(10) OCCURS 100 TIMES DEPENDING ON L;
  C ALPHA(100) SIZE DEPENDING ON L;
 );

Using the Stored Clause

The stored clause is used to conserve disk space. The user work area always contains a fully expanded version of the record; however, the record is compacted when it is stored on disk. The system automatically compacts records by eliminating items which contain a null value or which the user indicates should not be stored. Extra processor time is required to compact the record when it is stored and to expand the record when it is retrieved.

Items that include the stored clause cannot be keys, key data, or the object of the VERIFY ON clause for verified links. The required option must not be specified for stored items. The stored clause can be used only with items declared in compact data sets.

The following three forms of the stored clause are available:

  • STORED OPTIONALLY

  • STORED OPTIONALLY WITH

  • STORED DEPENDING ON

    Note: You cannot set the DATAENCRYPT option for items that use the STORED DEPENDING ON clause.

When STORED OPTIONALLY is specified, items containing a null value are not stored on disk. Items are initialized normally when the record is created. When the record is stored, the system examines each item which specifies STORED OPTIONALLY. Nonnull items are moved to the system buffer and then to disk. Null items are neither moved to the system buffer nor stored on disk. When the record is retrieved, the items stored on disk are moved to the user work area. Items which were not stored are restored to null values. For example:

C COMPACT DATA SET
 (
  A ALPHA(20) STORED OPTIONALLY;
  B ALPHA(35) NULL IS BLANKS, INITIALVALUE IS BLANKS,
    STORED OPTIONALLY;
 );

The STORED OPTIONALLY WITH clause is similar to the STORED OPTIONALLY clause. Like the STORED OPTIONALLY clause, the STORED OPTIONALLY WITH clause causes items containing null value to be omitted when the record is stored on disk. The STORED OPTIONALLY WITH clause has one additional effect. The Boolean item following WITH is assigned the value TRUE if the item is stored and is assigned the value FALSE otherwise.

The stored and Boolean items are initialized normally when the record is created. The system examines the item when the record is stored. If the item contains a null value, it is not stored and the appropriate Boolean item in the system buffer is assigned the value FALSE. Otherwise, the item is stored and the Boolean item is assigned the value TRUE. The value of the Boolean item in the user work area is not updated. The user must perform a find current operation if the new value of the Boolean item is required. User programs can alter the value of the Boolean item, but this does not affect whether the item is stored. When the item is retrieved, it is restored to the value it contained when the record was stored. The value of the Boolean item reflects whether the item was stored on disk.

The item following STORED OPTIONALLY WITH must be a nonsubscripted Boolean item or field bit name. If several Boolean items are required, a field item is normally used to conserve space. The Boolean item must not be a key or key data, and must not appear in a SELECT, VERIFY, or WHERE condition. The Boolean item must be associated with only one STORED item. The declaration of the Boolean item must precede the declaration of the item but need not be adjacent to it. For example:

C COMPACT DATA SET
 (
  B BOOLEAN;
  F FIELD
   (
    F1 BOOLEAN;
    F2 BOOLEAN;
   );
  X NUMBER(S9,2) STORED OPTIONALLY WITH B;
  Y NUMBER(8,3)  STORED OPTIONALLY WITH F1,
                 NULL IS HIGH-VALUE;
  Z NUMBER(12)   STORED OPTIONALLY WITH F2,
                 NULL IS 0;
 );

When STORED DEPENDING ON is specified, the user controls whether the item is stored on disk by assigning a value to the Boolean item following the DEPENDING ON element.

The stored and Boolean items are initialized normally when the record is created. When the record is stored, the value of the Boolean item is examined. This value controls whether the item is stored. The system does not examine the contents of the item; only the value of the Boolean item is significant. If the value of the Boolean item is TRUE, the contents of the stored item are moved to the system buffer and then to disk. If the Boolean item contains the value FALSE, the item is not stored. When the record is retrieved, the items stored on disk are moved to the user work area, and the remaining items are assigned a null value.

The item following the DEPENDING ON element must be a nonsubscripted Boolean item or field bit name. If several Boolean items are required, a field item is normally used to conserve space. Several items using the STORED DEPENDING ON option can depend upon a single Boolean item. The declaration of the Boolean item must precede the declaration of the stored item but need not be adjacent to it. For example:

C COMPACT DATA SET
  (
   B BOOLEAN, INITIALVALUE IS TRUE;
   F FIELD
    (
     F1 BOOLEAN;
     F2 BOOLEAN;
    );
   A1 ALPHA(20) STORED DEPENDING ON B;
   A2 ALPHA(30) STORED DEPENDING ON F1, NULL IS BLANKS;
   A3 ALPHA(200) STORED DEPENDING ON F2, NULL IS BLANKS;
   A4 ALPHA(155) STORED DEPENDING ON F2, NULL IS LOW-VALUE;
  );

Using the GEMCOS Clause

For the GEMCOS clause, you can specify the following options for real items and alpha items:

  • GEMCOS-LITERAL

  • GEMCOS-DBSN

  • GEMCOS-SSN

  • GEMCOS-DATA

The GEMCOS-LITERAL, GEMCOS-DBSN, GEMCOS-SSN, and GEMCOS-DATA options are used by the Unisys Transaction Server and the COMS/GEMCOS harness to communicate restart/recovery information to the DMSUPPORT library. See the Transaction Server Programming Guide for additional information.

For the GEMCOS clause, you can specify the following Transaction Server options for real items and alpha items:

  • COMS-ID

  • COMS-PROGRAM

  • COMS-LOCATOR

  • COMS-OUTPQ

The COMS-ID, COMS-PROGRAM, and COMS-LOCATOR options are used by the DMSUPPORT library to identify the fields that the Transaction Server uses to communicate restart/recovery information. The Transaction Server uses the COMS-OUTPQ with output protection. For more information on Transaction Server options, see the Transaction Server Programming Guide.

Because the new identifiers are context-dependent, these reserved words can be used as item identifiers. For example, both of the following declarations are valid:

G-DBSN REAL (S 11) GEMCOS-DBSN
GEMCOS-DBSN REAL (S 11) GEMCOS-DBSN