Rational Developer for System z, Version 7.6

Copybook generation wizard

This wizard enables you to obtain COBOL descriptions of Data Structures or SQL Database Blocks in a file. In this wizard, you must select one or more Data Structure, indicate a destination file, and valorize parameters such as the generation type, the COBOL location, format type.... Each description thus obtained is stored in a COBOL source library and can be incorporated into programs using the COPY clause.

The file which contains the description is generated in the Navigator view. To see its content, you must right-click on it and choose Open with > System z LPEX editor.
A single Data Structure can be used to generate various descriptions, each one adapted to a particular need in the program: in FILE SECTION or WORKING-STORAGE SECTION, taking the internal and input formats into account. To see the example of a DATA Input Aid generated in:
  • the FILE SECTION, click here,
  • the WORKING-STORAGE SECTION, click here.

When you generate the description of an SQL Database Block, two COPY clauses are generated for each Block: one for the host variables and one for the presence indicators.

Selected Data Structures
If you have requested the Copybook generation from the location or the entity level, all the Data Structures are selected by default, whereas if you have requested the generation from a given Data Structure, only this Data Structure is selected by default.
Destination
This field must contain the entire path to the destination file which will contain the generated COBOL descriptions.

This file must have a .cpy extension. If you have launched the Copybook generation wizard from a selected Data Structure, the filename defaults to the name of this Data Structure. On the other hand, if you have launched the wizard from a location or the Data Structure entity level, the filename defaults to the first Data Structure of the location.

The destination file is created in the Navigator view. By default, it is created in the project and package which already contains the corresponding Data Structure(s).

Generation type
You specify here whether the generated description must include the assigned Text lines or whether the description is to be used in VAP Connector.

To obtain the description of: an SQL Database Block, you must select one of the DSQC values here. Two Copybook levels are generated for each Block: one for the host variables, and one for the presence indicators.

Value Meaning
DC1 Generation of a Data Structure description without the recognition of assigned Text lines
DC2 Generation of Data Structure with the recognition of assigned Text lines
DC3 Besides the generation of Segment Cobol source, generation of the Data Element and Segment description lines in the form of comments which will be used by VAP Connector.
DSQC1 Generation of a Database Block description without the recognition of assigned Text lines
DSQC2 Generation of a Database Block description with the recognition of assigned Text lines
DSQC3 Besides the generation of Segment Cobol source, generation of the Data Element and Segment description lines in the form of comments which will be used by VAP Connector.
Data Structure code
This is the code of the Data Structure in the generated description.

The default value of this field is the value entered in the Name field of the Definition tab.

Data Structure external name
Enter here the filename used in the programs and in the COPY clause.

This filename is 8-character long maximum.

COBOL location
Select here the location of the description in the generated program.
Value Meaning
W WORKING-STORAGE SECTION or LINKAGE SECTION.

The different structures of a record are explicitly redefined.

F FILE SECTION

The different structures of a record will not contain a REDEFINES clause, since VA Pac automatically generates all REDEFINES.

V Generation of a variable file.
Type of COBOL to generate
Here you must specify which type of COBOL the generated description will be adapted to. This adaptation does not apply to the USAGE clauses.
Value Meaning
0 Adaptation to IBM MVS ANSI COBOL
1 Adaptation to IBM DOS ANSI COBOL
3 Adaptation to PC/MICROFOCUS COBOL
4 Adaptation to GCOS7 COBOL
5 Adaptation to GCOS8 COBOL
7 Adaptation to HP-3000 COBOL
8 Adaptation to UNISYS A Series COBOL
F Adaptation to TANDEM COBOL
I Adaptation to DEC/VAX COBOL
K Adaptation to ICL 2900 ANSI COBOL
M Adaptation to GCOS6 COBOL
O Adaptation to AS 400 COBOL
U Adaptation to UNISYS 2200 Series COBOL
X Adaptation to IBM COBOL for OS/390
Format type
Specify here which type of Data Element format will be used in the description.
Value Meaning
E Description using input formats
I Description using internal formats with their associated 'usages'
S Description using output formats
Record type
This field enables you to specify different ways of arranging the records of a Data Structure in the description.
Value Meaning
  Implicit or explicit redefinition of records.
1 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 appears in the COBOL FILE SECTION, the level number must be 2
2 Continuous sequence of records that include the initial values entered on the Segments' -CE Lines, or, by default, initial values of blank or zero according to the format (this option is reserved for descriptions in the WORKING-STORAGE SECTION).
3 Continuous sequence of records taking into account the Table size specified on the Segment Definition.

If the Data Structure description appears in the COBOL FILE SECTION, the level number must be 2.

This type of description can only be used for a Data Structure which has a Table size on the common part Segment.

4 Continuous sequence of records taking into account the Table size specified on the Segment Definition. The associated level number must be 3.

The level 2 allows access to the table created by the repetition of a given record (FFEET).

The level 1 consolidates all the information in the Data Structure (whether or not the common part and specific parts are occursed).

This type of description can only be used for a Data Structure which has a Table size on the common part Segment.

Level number of the record
This field, used in relation with the previous one, defines the level number of the descriptions of Data Structures, records, or Data Elements.
Value Meaning
1 Level 01 for Data Structures and records.

If the Data Structure description appears in the COBOL FILE SECTION, the records must be redefined.

If the Data Structure has no 'common part' with a Record type other than 'blank', the file level does not appear.

2 Level 01 for Data Structures and 02 for records. Level 01 does not appear if the Record type is 'blank'.
3 Level 02 for Data Structures and 03 for records, when associated with a Record type set to 1, 2 or 3.

Level 01 for Data Structures and 03 for records, when associated with a Record type set to 4.

Level 03 for Data Structures and records when associated with a Record type set to 'blank'.

Segment selection
If you do not enter anything in this field, all the Segments of the selected Data Structure(s) will be selected.

The selection is constituted of the chosen record codes, which may or may not be sorted.

To select the common part of a multi-records file, you must specify it explicitly.


Terms of use | Feedback

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