Definition tab

In this tab, you must complement the information that you entered when you created the Copybook. With this additional information, you specify the content of the generated description.

Generation option

The value of this field was selected when the Copybook was created. It cannot be modified.

The following generation options are available.
Table 1. Values of the generation option
Values Meaning
DC1 : DATA option C1 Generation of a Data Structure description.
DC3 : DATA option C3 Generation of a Data Structure description.

Generation of the Segment COBOL source code with the names and labels of the Data Elements and Segments as comments.

Data Structure

The value of this field was selected when the Copybook was created. It cannot be modified.

By default, all the Segments of this Data Structure will be part of the generated description. However, in the Selection tab of the Copybook editor, you can select the appropriate Segments only.

COBOL target

By default, the generated COBOL files are stored with the design files in a root folder whose default name you can change. You can separate them from the design files or even change the generation project and folder.

In a Library, the default values of the COBOL project and of the COBOL folder are the values of the current project.

COBOL project
The files that are generated from this instance will be stored in the project displayed in this field.

The project of the corresponding design file is the default project. If it has been kept, Default is displayed between parentheses next to the project. However, if it has been explicitly changed in the instance, only the project is displayed here, without any other indication. If it has been explicitly changed in the generation Library, Inherited from Library is then displayed between parentheses next to the project. In the instance, you can overwrite the value that is inherited from the Library.

You can select a new project in the drop-down list.

If you change the project, the COBOL folder is automatically set to the default value (rpp). The new project will be taken into account upon the next generation.

COBOL folder
The files that are generated from this instance will be stored in the folder displayed here, inside the project displayed in the previous field.

The folder of the corresponding design file is the default folder. If it has been kept, Default is displayed between parentheses next to the folder. However, if it has been explicitly changed in the instance, only the folder is displayed here, without any other indication. If it has been explicitly changed in the generation Library, Inherited from Library is then displayed between parentheses next to the folder. In the instance, you can overwrite the value indicated in the Library.

If the default folder has been kept, you can specify a root path for the generated files in the Properties wizard (accessed by clicking the Change project properties button). This path will be automatically inserted in this field, at the beginning of the folder.

You can select a new folder in the drop-down list. Creating a folder is impossible at this stage. Folders must have already been created in the project, for example from the Resource perspective.

If you change the folder, it will be taken into account upon the next generation.

Change project properties
This button opens the Properties wizard, where you can complete the following actions:
  • Change the default folder. This folder contains the design files and is the default target of the generated and metadata files.
  • Indicate a root path for the generated files, if the default generation folder has been kept.
  • Indicate a root path for the metadata files, which are stored by default in the same folder as the other generated files.
Note: A detailed help is available from the Properties wizard of the project.
Generate with DATA Input Aid parameters
If you check this box, the Copybook will be generated with the parameters of the DATA Input Aid that is called in the -GC Lines of the Data Structure.
Note: If a DATA Input Aid is called in the -GC Lines of a Segment of the Data Structure, it will not be used upon generation.

If you do not check this box, the Copybook will be generated with the values that are indicated in its Definition tab.

It is impossible to mix the parameters of the DATA Input Aid in the Structure with the generation parameters of the Copybook.

Specific coding
In this field, you can specify a specific coding of the Segment names in the generated description.
Data Structure code in the Copybook
The default value is the value that displayed in read-only mode in the Data Structure field of this tab.
External name
This name represents the file name that is known by the programs and that is used in the COPY statement.

Its default value is the instance name but you can modify this value.

Description location
You must select the location of the description in the program that will call this Copybook.
Table 2. Values of the description location
Values Meaning
W : WORKING-STORAGE SECTION or LINKAGE SECTION The description will be generated in the WORKING-STORAGE SECTION or the LINKAGE SECTION of the calling program.

The various structures of a record are explicitly redefined.

F : FILE SECTION The description will be generated in the FILE SECTION of the calling program.

The various structures of a record will not contain a REDEFINES clause because it is implicit.

V : Variable file generation The description will be generated as a variable file.
Variant
You must specify the type of COBOL that the generated description will be adapted to. This adaptation does not apply to the USAGE clauses.

By default, it is the variant of the Library that contains the generation parameters.

Note: Some variants are deprecated or not supported.
Format type
You must select which type of Data Element format will be used in the description.
Table 3. Values of the format type
Values Meaning
E : Input The description uses the Data Element input formats.
I : Internal The description uses the Data Element internal formats, with their associated usages.
S : Output The description uses the Data Element output formats.
Description type
In this field, you can specify different ways of arranging the records of a Data Structure in the description.
Table 4. Values of the description type
Values Meaning
Redefined records Implicit or explicit redefinition of records.
1: Records without initial values Continuous sequence of records (common part Segment followed by the different specific part Segments) without initial values or repetitions of records.

If the Data Structure description is included in the FILE SECTION, the Record level must be 2.

2: Records with initial values Continuous sequence of records. It includes the initial values that are entered on the Segment -CE Lines. If none was entered, it sets the initial values to blank or zero, according to the format.

This option is reserved for descriptions in the WORKING-STORAGE SECTION.

3 : Records with occurs (used with level 2) Continuous sequence of records that takes into account the Table size from the Segment Definition.

If the Data Structure description is included in the FILE SECTION, the Record level must be 2.

This type of description is used only for a Data Structure whose common part Segment is assigned a Table size.

4 : Records with occurs (used with level 3) Continuous sequence of records that takes into account the Table size from the Segment Definition. The associated Record level must be 3.

The COBOL level 02 provides an access to the table that consists of the repetition of a record.

The COBOL level 01 consolidates all the Data Structure information (common part and specific parts that are repeated or not).

This type of description is used only for a Data Structure whose common part Segment is assigned a Table size.

Record level
This field is used together with the previous field. It defines the level number of the descriptions for Data Structures, Segments, or Data Elements.
Table 5. Values for the Record level
Values Meaning
1: COBOL 01 level for DS area and Segments Level 01 for Data Structures and Segments.

If the Data Structure description is included in the FILE SECTION, the Segments must be redefined.

If the Data Structure has no common part and has a Description type other than Redefined records, the file level is not displayed.

2: COBOL 01 level for DS area and Segments at 02 level Level 01 for Data Structures and 02 for Segments.

Level 01 is not displayed if the Description type is Redefined records.

3: COBOL level varying with record description type Level 02 for Data Structures and 03 for Segments if the Description type is 1, 2, or 3.

Level 01 for Data Structures and 03 for Segments if the Description type is 4.

Level 03 for Data Structures and Segments if the Description type is Redefined records.

4: COBOL 02 level for Data Elements, DS area and Segment levels disappear Level 02 for 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 Data Structure and Segment levels are not included.

The level 01 must be defined in the work areas.

5: COBOL 01 level for Data Elements, DS area and Segment levels disappear Level 01 for 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 Data Structure and Segment levels are not included.

Feedback