Undefined Data call
From the table or the Undefined Data definition section, you can specify or modify the Data Element name, label, internal format, usage, occurs number, and sort key. You can also open a wizard to select presence checks and subschemas for the Data Element. From the table only, you can redefine a Data Element with the same COBOL level. From the Undefined Data definition section only, you an open the -G Lines of the call.
- Name
- Enter the Data Element name directly in the table or in the Undefined Data
definition section. If the name of the undefined Data Element exists as a defined Data
Element, an error is displayed on the Data Element call line.
Some Data Element names are forbidden because they have a reserved use in Data Structures, Reports, or Screens. The following table lists the Data Element names that cannot be created.
Table 1. List of reserved Data Element names Name Reserved for FILLERField alignment ENPRGRPRERUTData Element error check in transaction files Segment error check in transaction files
User-defined errors in transaction files
You can replace the call of an undefined Data Element with a call of a defined Data Element. To do so, right-click the undefined Data Element call and select Transform undefined Data Element into defined Data Element. In the Data Elements selection wizard that opens, select or create a Data Element. If you create a Data Element, then the name, format, label, and usage of the defined Data Element automatically default to the values of the undefined Data Element. You can overwrite them. Click Finish to create the Data Element.
In the Data Elements selection wizard, click OK. The defined Data Element then replaces the undefined Data Element in the table. Its label, internal format, and usage automatically take on the values of the defined Data Element. Its icon switches to the icon of a defined Data Element. The additional controls, if any, that were indicated on the undefined Data Element call are removed.
- Label
- Enter the label that identifies the instance. It will constitute a search criterion upon a subsequent search.
- 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.
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 asS9(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.
TheINTERNAL USAGEclause 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 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 Time stamp 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/ generatesCCYY/MM/DDinstead ofCCYY-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
For Data Elements that are not specified in the repository, you must select a usage after the internal format.
- Usage
- It corresponds to the COBOL
USAGEclause.With the
USAGEclause 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 generatesUSAGE BINARYand F generatesUSAGE COMP-1.The possible usage values depend on the Data Element type.
Table 3. Possible values of the usage for a Data Element (type R, P, or A) Value Meaning C COMPUTATIONAL(binary) IBM or equivalent.BINARYIBM and COBOL II variant.D DISPLAY(default option).Required for date Data Elements or Data Elements with a date format.
F COMPUTATIONAL-1IBM or equivalent.COMPUTATIONAL-9GCOS7.COMPUTATIONAL-11GCOS8.Floating point, simple precision for relational databases.
G COMPUTATIONAL SYNCHRONIZED RIGHTICL 2900COMPUTATIONAL-5MICRO FOCUS.H COMPUTATIONALUNISYS 2200.BINARYUNISYS 2200 (COBOL 85).I DISPLAY-1UNISYS 2200.J COMPUTATIONAL-6GCOS8.REALUNISYS-A.N COMPUTATIONAL-4aligned on a half-byte. You must add the complement if the length is uneven.O COMPUTATIONAL-4UNISYS 2200.P COMPUTATIONAL-1GCOS8.Q COMPUTATIONALGCOS8.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 SYNCGCOS8.U COMPUTATIONAL-1UNISYS 2200.W COMPUTATIONAL-2UNISYS 2200.COMPUTATIONAL-12GCOS8.Floating point, double precision for relational databases.
X DISPLAY SIGN IS TRAILING SEPARATE CHARACTERUNISYS 2200, GCOS7, GCOS8, IBM, and TANDEM.Y POINTERIBM and MICRO FOCUS.DB-KEYGCOS8.Z Reserved to batch applications. It is used only with an output format to generate a BLANK WHEN ZEROclause.0 COMPUTATIONAL-7GCOS81 DISPLAY SIGN LEADING SEPARATEUNISYS 2200, GCOS7, GCOS8, IBM, and TANDEM.2 DISPLAY-2GCOS8= DISPLAY. Fields are compared in accordance with the commercial collating sequence and not in accordance with the standard BULL sequence.3 COMPUTATIONAL-3IBM or equivalent.COMPUTATIONALGCOS7PACKED-DECIMALUNISYS 2200 (COBOL 85)4 DISPLAY-2(unsigned packed decimal) NCR.5 COMPUTATIONAL-1GCOS7 and GCOS8.6 COMPUTATIONAL-2GCOS7 and GCOS8.7 COMPUTATIONAL-5ICL 2900.8 COMPUTATIONALBULL 66 and GCOS8.9 COMPUTATIONAL-3GCOS7 and GCOS8.Table 4. Possible values of the usage for a Large Object (type L) Value Meaning 1 USAGE SQL TYPE IS BLOB (n|nK|nM|nG)for Large Object-type Data Elements that are used as columns in DB2® databases.SQL-BLOBfor Large Object-type Data Elements that are used as columns in ORACLE databases.2 USAGE SQL TYPE IS CLOB (n|nK|nM|nG)for Large Object-type Data Elements that are used as columns in DB2 databases.SQL-CLOBfor Large Object-type Data Elements that are used as columns in ORACLE databases.3 USAGE SQL TYPE IS DBCLOB (n/nK/nM/nG)for Large Object-type Data Elements that are used as columns in DB2 databases.SQL-BFILEfor Large Object-type Data Elements that are used as columns in ORACLE databases.4 USAGE SQL TYPE IS BLOB-LOCATORfor Large Object-type Data Elements that are used as columns in DB2 databases.5 USAGE SQL TYPE IS CLOB-LOCATORfor Large Object-type Data Elements that are used as columns in DB2 databases.6 USAGE SQL TYPE IS DBCLOB-LOCATORfor Large Object-type Data Elements that are used as columns in DB2 databases.7 USAGE SQL TYPE IS BLOB-FILEfor Large Object-type Data Elements that are used as columns in DB2 databases.8 USAGE SQL TYPE IS CLOB-FILEfor Large Object-type Data Elements that are used as columns in DB2 databases.9 USAGE SQL TYPE IS DBCLOB-FILEfor Large Object-type Data Elements that are used as columns in DB2 databases.Table 5. Possible values of the usage for a Unicode Data Element (type U) Value Meaning N NATIONAL(default usage)X NATIONAL SIGN IS TRAILING SEPARATE CHARACTER1 NATIONAL SIGN IS LEADING SEPARATE CHARACTER
- Occurs
- This field represents the
OCCURSclause of an elementary Data Element, a group, or a filler. The restrictions of the COBOLOCCURSclause apply.
- Sort key
- This field identifies all the Data Elements that can be used as control break sort keys, or as
access keys to a file, a database or a Pactables Table.Note: It is advised to dedicate a Segment to only one type of use. Each Data Element that can belong to a sort key must be referenced by a unique alphabetic or numeric character. It is advised to reference the indicators by a series (1, 2, 3 for example). The actual sort sequence is selected at the Program level (on the -CD Lines tab).The format of the key group Data Elements must have been entered in the repository or at the Segment level.
Table 6. Possible values of the sort key for Pactables Value Comments U References the access key for a Table. This value must be indicated on the group Data Element if it is a group key. S Indicates that the Data Element belongs to at least one subsystem. Table 7. Possible values of the sort key for DL/1 databases Values Comments U References a unique key for a DL/1 database. M References a multiple key for a DL/1 database. 1 - 9 Secondary index All other values designate a search field. Table 8. Possible values of the sort key for AS400 and relational databases Values Comments 0 - 9 AS400 physical file key. Relational databases. V Variable length column. Blank Fixed-length column. W For DB2 SQL, SQL/DS and ORACLE, generation of a variable length column ( VARCHAR).L For DB2 SQL, SQL/DS and ORACLE, generation of a LONG VARCHAR.Note: Sort keys are not authorized on Data Elements redefining other Data Elements.
- Redefine
- Redefinition is possible within a Segment. It generates the COBOL
REDEFINES clause. The Data Element where this option is selected redefines the Data
Element of the same COBOL level that precedes it in the -CE Lines of the
Segment. If a Data Element that redefines another Data Element is contained in a group, it is
considered to be an elementary Data Element. It must be taken into account in the calculation of the
number of Data Elements in a group (except for DL/1 database Segments). Note: When Data Elements are redefined, their respective lengths are not taken into account. It is your responsibility. The redefined Data Element length is used for the calculation of the address length. Redefined Data Elements are ignored to generate a Database Block. If the Redefines box is checked, no initial value can be entered.
More
-G Lines
Click -G Lines to specify -GC, -GE, or -GG lines for the Data Element call in the Segment.