Working data - Data Structures

This level contains the Data Structures called in the WORKING-STORAGE SECTION of the instance.

The Data Structure call level

The first column shows the Data Structure Code in program and the second column shows its COBOL position and Line number, followed by its external name.

If you expand this level, you can see the Data Structure call Attributes and Description which contain the following fields:

COBOL position
You indicate the placement and the sequence in which the lines entered in this tab are to be generated. These characters form the first two characters of a sequencing number, with the value in the line number as the last three digits.

The value that you can enter here changes according to whether it is a COBOL position for a Program or a Screen.

Table 1. Values of the COBOL position for a Program
Value Meaning
AA to ZZ and 0A to 0Z These values cause the lines entered in this tab to be generated at the beginning of the WORKING-STORAGE SECTION.
These lines are generated:
  • Before the description of the Data Structures whose organization is W: file description in Working and whose code in program matches this prefix or is greater than it,
  • Before the description of the Data Structures whose organization is L: Working with placement, and whose COBOL position matches this prefix or is greater than it.
00 to 09, 1A to 19... 9A to 99 The lines entered in this tab will be generated in the WORKING-STORAGE SECTION, after all the Data Structures whose COBOL position is lower than this prefix
Table 2. Values of the COBOL position for a Screen
Value Meaning
AA to 0Z The description is generated in the WORKING-STORAGE SECTION.
00 to 99 The description is generated in the LINKAGE SECTION.
AA and 00 These values are used for automatically generated data.
99 With a Line number = 999, this value is used for the PROCEDURE DIVISION statement. Therefore, you can use it to create a line with a sequencing number 99999, which replaces the PROCEDURE DIVISION line automatically generated.
$n This value represents a parameterized value in a Macro.
Line number
This line number, constituted of three digits, is concatenated with the two characters of the COBOL position. The line number can be:
  • 0 to 999: It is advised to number the lines, starting with 10, by intervals of 10, to facilitate any future insertion
  • $n0 to $n9: In a Macro, only the first two characters of the Line number can be parameterized.
Occurs
You enter this field if the data name (entered in the Comment field if you are viewing a comment call, or in the Text before field if you are viewing a Data Element call) is repeated. You enter the maximum number of occurrences. This value is numeric, on five characters maximum.
An entry in this field causes the generation of the following three indexes (ddss = Segment code):
  • IddssM initialized to the value entered.
  • IddssL initialized to zero. This index can be used to load the table. It tracks the actual table size
  • IddssR initialized to zero. This index can be used for table searches.

In a Macro, you can parameterize it by assigning it a $n value.

Group Segments
If its value is set to true, all the Segments of the same Data Structure are grouped in the generated code.
Native selection
This field corresponds to the parameterized selection of Segments in the WORKING-STORAGE SECTION.
Code in program
This code is two characters long. The first character must be alphanumeric and the second character must be either numeric or alphabetic.

It sets the sequence in which the Data Structure or Report is processed in the program.

When the Data Structure or Report is used only once in a program, it is advised to indicate the code that is entered as the Data Structure or Report name. This name is entered upon creation. However, if it is called more than once in a program, you can differentiate these calls.

You can parameterize this code in a Macro with $n.

Organization
Select an organization value.

You can select whether the Data Structure must be generated in the WORKING-STORAGE SECTION, or as the description of a Pactables Table.

You can also use this field to specify database descriptions when the Database Description function is not used. These values are taken into account by application Programs.

Table 3. Possible values for the organization
Value Comment
S: Sequential Only authorized value for a Report, a sequential file or a sort file Data Structure.
V: VSAM, UFAS One of the two possible values for an indexed file Data Structure

This value generates the STATUS KEY IS clause. The corresponding field is declared in the File Status field of the -CD Line Definition of the -CD Lines tab (the part that can be viewed by clicking More).

I: Indexed The other possible value for an indexed file Data Structure.

This value corresponds to an indexed sequential organization (ISP for GCOS8 BCD).

An ISP file coded LE is generated in 3 work areas:
  • LE-FILE,
  • LE-DATA
  • INVKEY.
The VALUE of LE-DATA is the external file name that must be the file code in the preceding $ DATA line. In the job control lines, the ISP lines give the physical characteristics of the file.
G: Table description This value generates the communication area with the Pactables function.
L: Working with placement File descriptions are generated in the WORKING-STORAGE SECTION, in the location you indicate in the COBOL position field.
W: File description in Working File descriptions are generated in the WORKING-STORAGE SECTION, before the WSS-BEGIN constant.
Y: Pacbench C/S Call of the COPY clause that corresponds to the communication area between the client and the server (Pacbench C/S Business Components only).
X: Comment Data Structure that is used as a comment, not used for generation.
2: DB2 Segments or VAX/SQL Generation and description of a DB2 or VAX/SQL Segment. Only the physical accesses are not generated. The structure of the variable indicators corresponding to the columns of the DB2 or VAX/SQL table is always generated.
Q: DB2 or ALLBASE/SQL Reserved for the description of SQL/DS, DB2/2 or DB2/6000 databases (IBM), or ALLBASE/SQL databases (HP3000), or DB2/2 or DB2/600 databases (MICRO FOCUS).
D: DL/1, IDS I and II Reserved for the description of Segments or records of the IMS (DL/1), IDS I or IDS II databases, in the generation of DBD, SYSGEN, schemas, or application programs
B: IDMS IDMS
A: ADABAS ADABAS
T: TOTAL files TOTAL files
O: ORACLE (< V6) ORACLE (< V6)
C: INTEREL RDBC or RFM INTEREL RDBC or RFM
R: RDMS RDMS
4: DB2/400 DB2/400
M: DATACOM DB DATACOM DB
N: NONSTOP SQL NONSTOP SQL
P: ORACLE V6 and V7 ORACLE V6 and V7
9: INFORMIX, SYBASE, INGRES/SQL, or SQL SERVER INFORMIX, SYBASE, INGRES/SQL, or SQL SERVER
Z: Data Structure for SOCRATE/CLIO Data Structure for SOCRATE/CLIO
F: Formal for SOCRATE/CLIO Formal for SOCRATE/CLIO
Format type
You select the format of the Data Elements that are called in the Segments of the Data Structure.
You must select the format according to the usage of the Data Structure, which is specified in the -CD Lines tab of the Program editor. This field does not apply to the Data Structures whose usage is I: Direct printing or J: Indirect printing.
Note: The Data Elements making up the Segments must not exceed 999 characters.
Table 4. Format types for Data Elements
Value Comment
E : Input Default value for Data Structures with a usage set to M: Transaction to be validated, N: Transaction not to be validated, or E: Transaction with error checking
I: Internal Default value for Data Structures whose usage is not set to: M: Transaction to be validated, N: Transaction not to be validated, or E: Transaction with error checking
S: Output  
Subschema
A subschema is a group of Data Elements that are called in the Segment.

This field is used with the Pactables function, to indicate which subschema is to be described. It is numeric, from 0 to 9 (0 corresponds to subschema 10).

Generated description type
You select the type of record description to be used in the COBOL program to allow different uses of the Segment description that is stored in the Library.
Table 5. Values of the generated description types
Value Meaning
Redefined records No VALUE clause is generated
1: Records without initial values Records without initial values or occurs. These records contain the Segment common part, followed by the different specific parts.

If the Data Structure description is included in the COBOL FILE SECTION, the COBOL record level field must be set to 2: COBOL 01 level for DS area and Segments at 02 level.

With this value, the specific Segments are described without redefines, at the COBOL level 02. Several Segment descriptions are grouped under the same I/O area.

2: Records with initial values Records with the specific initial values indicated in the Segment -CE Lines tab. These values can also default to blank or zero depending on the format. Initial values are also generated for the multiple occurrence fields if the Generated language of the Library is set to D: COBOL II, 85, LE.
3: Records with occurs (used with level 2) Records that incorporate the number of occurrences that are indicated in the Table size field of the Segment Definition tab.

No VALUE clause is generated.

If the Data Structure description is included in the COBOL FILE SECTION, the COBOL record level field must be set to 2: COBOL 01 level for DS area and Segments at 02 level.

You cannot use this description type if the common part Segment of this Data Structure is assigned a value in the Table size field of the Segment Definition. In that case, set the Organization to W: File description in Working and the Usage to T: Table stored in memory.

4: Records with occurs (used with level 3) Records that incorporate the number of occurrences that are indicated in the Table size field of the Segment Definition tab. The associated Level field must be set to 3.

The associated COBOL record level must be set to 3: COBOL level varying with records description type

Comment specific to the OnLine Systems Development function: The index is not generated if the Generated description type set to 4: Records with occurs (used with level 3), and the COBOL record level is set to 3: COBOL level varying with records description type,

A COBOL level 02 is used to access the table made up of occurs of the same record (ddssT).

A COBOL level 01 is used to group the whole Data Structure (common or specific parts, whether occurred or not). A group level field that incorporates all instances is generated.

You cannot use this description type if the common part Segment of this Data Structure is assigned a value in the Table size field of the Segment Definition tab. In that case, set the Organization to W: File description in Working, and the Usage to T: Table stored in memory.

COBOL record level
This option is used with the Generated description type field. It defines the COBOL level number for the descriptions of Data Structures, Segments, and Data Elements. In the following descriptions, the expression "D.S. area" is meant as the dd00 area (possibly 1-dd00, 2-dd00).
Table 6. Possible values for the COBOL record level
Value Meaning
1: COBOL 01 level for DS area and Segments If the Data Structure description is included in the COBOL FILE SECTION, the Segments must be redefined.

If a Data Structure has no common part with a non-redefined description, the D.S. area is only included when the Generated description type is set to Redefined records.

2: COBOL 01 level for DS area and Segments at 02 level If the Generated description type is set to Redefined records, the D.S. area and Segments are described at level 02. Preferably set the Organization to L: Working with placement and define the higher levels through work areas.
3: COBOL level varying with records description type Level 02 for D.S. area and level 03 for Segments if the Generated description type is set to 1: Records without initial values, 2: Records with initial values or 3: Records with occurs (used with level 2).

Level 01 for D.S. area and level 03 for Segments if the Generated description type is set to 4: Records with occurs (used with level 3).

Level 03 for both the D.S. and Segments if the Generated description type is set to Redefined records.

4: COBOL 02 level for Data Elements, DS areas and Segment levels disappear Reserved for the D.S. with an Organization set to L: Working with placement and a Usage set to D: Output file.

Level 02 for the group Data Elements or elementary Data Elements that are not part of a group. The elementary Data Elements that are part of a group are displayed but the D.S. area and Segment levels are not included.

Level 01 is to be defined in the work areas.

5: COBOL 01 level for Data Elements, DS areas and Segment levels disappear Organization set to L: Working with placement or W: File description in Working and a Usage set to D: Output file.

Level 01 for the group Data Elements or elementary Data Elements that are not part of a group. The elementary Data Elements that are part of a group are displayed but the D.S. area and Segment levels are not included.

Expanding the Data Structure call level reveals the Data Structure level, with its Segments.

The Segment level

The Segment level is nested in the Data Structure level. The first two characters of the Segment are constituted by the Data Structure and the last two characters are the Segment code in program.

The Segment level displays the Segment name in the first column and the Segment label in the second column.

If you expand this level, you see the Segment code in program, which is editable.

The composition of each Segment (equivalent to the -CE Lines tab) is displayed in the nested level, with one line for each called Data Element. If you expand the first line of a called Data Element, you can see and modify its name and label. Its Attributes level contains the same information as the Definition tab, except the inheritance, which can be specified in the tab only.


Feedback