Definition tab

In the Definition tab, you indicate the formats, type, and usage of the Data Element. You can also indicate a parent Data Element, if any, and the Blank when zero option.

Type
Select one of the following types:
  • R: Data Element is an elementary piece of information that is used in applications. It is the default value.

    In the Database function, it represents a CODASYL elementary data or a relational column.

  • P: Property is an elementary piece of information that is defined at the conceptual level.
    Note: The format is optional.
  • A: Alias Data Element.
  • L: Large Object Data Element.
  • U: Unicode Data Element.
    Note: The usage must be N (default), X, or 1.
Inheritance
A Data Element is an elementary concept. In your applications, you might want to use several technical variants of this concept. To guarantee the coherence of your data, you manage these variants by creating parent and child Data Elements.

The characteristics of the parent Data Element (its formats, its usage, and the Blank when zero option) are passed on to its child, where they are marked as Inherited. In the child, you can modify the characteristics that are inherited from its parent. In this case, you see Redefined next to the modified characteristic.

Note: If the label of a child Data Element is not specified, the label of its parent Data Element is displayed in the Design Explorer view, impact analysis search result views, and selection lists.

All the Data Elements from the same family are logically linked. A child Data Element cannot be a parent as well. The inheritance tree of the current instance displays its parent, if any, and its children, if any.

If a parent Data Element is already specified for the Data Element, its name is displayed in this field. You can remove the parent Data Element by clicking Remove. If no parent is declared, No inheritance is displayed.

If you want to specify a parent Data Element, click Change and select a Data Element in the selection wizard.

This wizard displays the three Data Element formats in the following order: internal format, input format, and output format.

Internal format
This format, which is displayed in the Overview tab, is required, except if the Data Element is a Property.

The internal format is used when the Data Element is called in one of the following components:

  • An application file (permanent file, database, temporary file).
  • A Screen as a data-entry field, if no conversational format was specified. See the type of line field in the -D Lines tab of the Data Element editor.
This format is automatically transferred into the Segments where the Data Element is called. But you eventually select the appropriate format in the -CD Lines tab of the Programs that call these Segments.

You must ensure the compatibility between the input and internal formats.

The length that corresponds to the format is automatically computed and displayed. If you modify the format, you must save the Data Element so that the length can be computed again.

The internal format must be coded like a COBOL picture (without print characters).
Notes:
  • If the format of a numeric Data Element is more than 10 characters long, you must omit the 9 that would normally be entered after the V. For example, S9(10)V9(3) must be entered as S9(10)V(3). This way of coding must not be used when the format is shorter than 10 characters.
  • For Unicode-type Data Elements, you must indicate N(n) or a signed or unsigned numeric format.
The INTERNAL USAGE clause is associated with this format.
Note: If a Unicode-type Data Element has a signed numeric internal format, its internal usage must be X or 1.
Data Elements that represent a date can be assigned a symbolic format.
Table 1. Symbolic formats for dates
Symbolic value Meaning
D Without century (DDMMYY or MMDDYY)
I Without century (YYMMDD)
E Without century (DD/MM/YY or MM/DD/YY)
S With century (CCYYMMDD)
C With century (DDMMCCYY or MMDDCCYY)
M With century (DD/MM/CCYY or MM/DD/CCYY)
G Gregorian format (CCYY-MM-DD)
T Time format (HH:MM:SS)
TS Timestamp format
Note: For the formats that include a separator (E, G, M, and T), you can specify a separator after the character that represents the format if you do not want to use the default separator. For example, G/ generates CCYY/MM/DD instead of CCYY-MM-DD, which is the default Gregorian format.

For details on the use of the formats with the various types of Database Blocks, see the summary tables in chapter Columns: Data Elements of the Relational SQL Database Description manual at this URL:

http://www-01.ibm.com/support/docview.wss?rs=37&uid=swg27005477

Input format
This format is specific to the batch applications. It is required when the Data Element is called in an input transaction file in a batch flow.

This format is converted into the internal format when the permanent files are transferred.

If you do not specify an input format, the internal format is automatically recognized.

The input format is automatically transferred into the Segments where the Data Element is called. But you eventually select the appropriate format in the -CD Lines tab of the Programs that call these Segments.

You must ensure the compatibility between the input and internal formats.

The input format must be coded like a COBOL picture.
Note: For Unicode-type Data Elements, you must indicate N(n) or a signed or unsigned numeric format.

The length that corresponds to the format is automatically computed and displayed. If you modify the format, you must save the Data Element so that the length can be computed again.

The usage is always DISPLAY, except for Unicode-type Data Elements, whose usage is N (default), X, or 1.

Data Elements that represent a date can be assigned a symbolic format.
Table 2. Symbolic formats for dates
Symbolic value Meaning
D Without century (DDMMYY or MMDDYY)
I Without century (YYMMDD)
E Without century (DD/MM/YY or MM/DD/YY)
S With century (CCYYMMDD)
C With century (DDMMCCYY or MMDDCCYY)
M With century (DD/MM/CCYY or MM/DD/CCYY)
G Gregorian format (CCYY-MM-DD)
T Time format (HH:MM:SS)
TS Timestamp format
Note: For the formats that include a separator (E, G, M, and T), you can specify a separator after the character that represents the format if you do not want to use the default separator. For example, G/ generates CCYY/MM/DD instead of CCYY-MM-DD, which is the default Gregorian format.

For details on the use of the formats with the various types of Database Blocks, see the summary tables in chapter Columns: Data Elements of the Relational SQL Database Description manual, available from the VisualAge Pacbase documentation at:

http://www-01.ibm.com/support/docview.wss?rs=37&uid=swg27005477

Output format
The output format is used when the Data Element describes one of the following elements:
  • A field in a Report.
  • A protected field in a Screen, if no conversational format was specified (see the type of line' field in the -D Lines tab of the Data Element editor).

The output format is automatically transferred into the Segments where the Data Element is called.

It must be coded like a COBOL picture.
Note: Unicode-type Data Elements (U type) must have an N(n) output format (with the possibility to insert characters such as B, O, or /) or a numeric edited format.

The length that corresponds to the format is automatically computed and displayed. If you modify the format, you must save the Data Element so that the length can be computed again.

The usage is always Display, except for Unicode-type Data Elements whose usage is National (default), National sign is trailing separate char, or National sign is leading separate char.

Data Elements that represent a date can be assigned a symbolic format.
Table 3. Symbolic formats for dates
Symbolic value Meaning
D Without century (DDMMYY or MMDDYY)
I Without century (YYMMDD)
E Without century (DD/MM/YY or MM/DD/YY)
S With century (CCYYMMDD)
C With century (DDMMCCYY or MMDDCCYY)
M With century (DD/MM/CCYY or MM/DD/CCYY)
G Gregorian format (CCYY-MM-DD)
T Time format (HH:MM:SS)
TS Timestamp format
Note: For the formats that include a separator (E, G, M, and T), you can specify a separator after the character that represents the format if you do not want to use the default separator. For example, G/ generates CCYY/MM/DD instead of CCYY-MM-DD, which is the default Gregorian format.

For details on the use of the formats with the various types of Database Blocks, see the summary tables in chapter Columns: Data Elements of the ″Relational SQL Database Description' manual at this URL:

http://www-01.ibm.com/support/docview.wss?rs=37&uid=swg27005477

Usage
It corresponds to the COBOL USAGE clause.

With the USAGE clause of a COBOL numeric variable, you indicate the internal representation of its value. Different usages are available depending on the COBOL variants that are adapted to the material in use.

You select a Data Element usage according to the type of COBOL to be generated and according to the internal representation that you want.
Example: If you generate for IBM®, a C usage generates USAGE BINARY and F generates USAGE COMP-1.
Table 4. Possible values for the usage
Value Meaning
B COMPUTATIONAL-1 ICL 1900

BINARY-1 UNISYS 1100

C COMPUTATIONAL (binary) IBM or equivalent.

BINARY IBM and COBOL II variant.

D DISPLAY (default option except for Unicode-type Data Elements).

Required for date Data Elements.

F COMPUTATIONAL-1 IBM or equivalent.

COMPUTATIONAL-9 GCOS7.

COMPUTATIONAL-11 GCOS8.

Floating point, simple precision for relational databases.

G COMPUTATIONAL SYNCHRONIZED RIGHT ICL 2900

COMPUTATIONAL-5 MICRO FOCUS.

H COMPUTATIONAL UNISYS 2200.

BINARY UNISYS 2200 (COBOL 85).

I DISPLAY-1 UNISYS 2200.
J COMPUTATIONAL-6 GCOS8.

REAL UNISYS-A.

N COMPUTATIONAL-4 aligned on a half-byte. You must add the complement if the length is uneven.

NATIONAL (default usage) for Unicode-type Data Elements (U type).

O COMPUTATIONAL-4 UNISYS 2200
P COMPUTATIONAL-1 GCOS8.
Q COMPUTATIONAL GCOS8.
R COMPUTATIONAL SYNCHRONIZED RIGHT, IBM or equivalent. This value is preferable to C when binary data is aligned on even addresses because the corresponding COBOL statements are more efficient.
T COMPUTATIONAL-3 PACKED SYNC GCOS8.
U COMPUTATIONAL-1 UNISYS 2200.
W COMPUTATIONAL-2 UNISYS 2200.

COMPUTATIONAL-12 GCOS8.

Floating point, double precision for relational databases.

X DISPLAY SIGN IS TRAILING SEPARATE CHARACTER or NATIONAL SIGN IS TRAILING SEPARATE CHARACTER for Unicode-type Data Elements (U type).
Y DB-KEY GCOS8.

POINTER IBM and MICRO FOCUS

Z Reserved to batch applications. It is used only with an output format to generate a BLANK WHEN ZERO clause.
0 COMPUTATIONAL-7 GCOS8
1 DISPLAY SIGN LEADING SEPARATE for UNISYS 2200, GCOS8, IBM, TANDEM, GCOS7.

NATIONAL SIGN IS LEADING SEPARATE CHARACTER for Unicode-type Data Elements (U type).

USAGE SQL TYPE IS BLOB (n/nK/nM/nG) for Large Object-type Data Elements (L type) that are used as columns in DB2® databases.

SQL-BLOB for Large Object-type Data Elements (L type) that are used as columns in ORACLE databases.

2 DISPLAY-2 GCOS8 = DISPLAY. Fields are compared in accordance with the commercial collating sequence and not in accordance with the standard BULL sequence.

USAGE SQL TYPE IS CLOB (n/nK/nM/nG) for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.

SQL-CLOB for Large Object-type Data Elements (L type) that are used as columns in ORACLE databases.

3 COMPUTATIONAL-3 IBM or equivalent.

COMPUTATIONAL GCOS7

PACKED-DECIMAL UNISYS 2200 (COBOL 85)

USAGE SQL TYPE IS DBCLOB (n/nK/nM/nG) for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.

SQL-BFILE for Large Object-type Data Elements (L type) that are used as columns in ORACLE databases.

4 USAGE SQL TYPE IS BLOB-LOCATOR for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.
5 COMPUTATIONAL-1 GCOS7 GCOS8

USAGE SQL TYPE IS CLOB-LOCATOR for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.

6 COMPUTATIONAL-2 GCOS7 GCOS8

USAGE SQL TYPE IS DBCLOB-LOCATOR for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.

7 COMPUTATIONAL-5 ICL 2900.

USAGE SQL TYPE IS BLOB-FILE for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.

8 COMPUTATIONAL BULL 66 GCOS8

USAGE SQL TYPE IS CLOB-FILE for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.

9 COMPUTATIONAL-3 GCOS7 and GCOS8.

USAGE SQL TYPE IS DBCLOB-FILE for Large Object-type Data Elements (L type) that are used as columns in DB2 databases.

Blank when zero
This box is associated with the formats.

If you select Yes, the BLANK WHEN ZERO COBOL clause is generated. Blanks replace the zero values that are normally printed or displayed.

It applies to numeric Data Elements only, for the retrieval of old versions.


Feedback