Rational Programming Patterns

Data Element call

To open the Data Element call section, click a Data Element call line entered in the list. You can enter or modify the values in the Occurs and sort key fields. You can also redefine a Data Element of the same COBOL level, and add other characteristics with the More... and -G Lines... buttons.

Occurs
The COBOL OCCURS clause is a pure numeric field. This field represents the OCCURS clause at an elementary Data Element level, or at a group level (maximum of three levels).
Sort key
This field identifies all the Data Elements that might 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 might 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 ...). The actual sort sequence is selected at the program level (in the -CD Lines tab) by sequencing the characters in the appropriate order.
Remember: The format of key group Data Elements must have been entered in the repository or at the Segment level.
Table 1. Sort keys
Values Meaning
U References the access key for a Pacbase 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. DL/1 database.
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 for a DL/1 database.
0 - 9 AS400 physical file key (relational databases).
V Variable length column (relational databases).
Blank fixed-length column (relational databases).
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.
Redefines
Redefinition is possible within a Segment or Logical View. It generates the COBOL REDEFINES clause. The Data Element containing this option redefines the Data Element of the same COBOL level which precedes it in the -CE lines. If a Data Element which 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 contained 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 address calculation. Redefined Data Elements are ignored when generating for the Database Description function. If the Redefines box is checked, no initial value can be entered.
To redefine a Data Element, select the Redefines option. A Set of Redefines line is created in the -CE lines. It contains the redefined Data Element and the preceding one of the same level in the tree structure. You must then define the Occurs option in the Set of Redefines section.

More

Click the More button to open a definition wizard in which you indicate the presence check values for the Data Element called in the Segment.

-G Lines

Click the -G Lines button to define -GC lines, -GE lines, and -GG lines for the Data Element called in the Segment.

Clicking the buttons in the section switches to the corresponding tabs of the Data Element editor.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)