Rational Programming Patterns for System z

Copybook generation wizard

You use this wizard to obtain COBOL descriptions of Data Structures in a file. In this wizard, you must select the Data Structure or some Segments. You indicate a destination file and give values to 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.

To see the contents of the description file, you must right-click it and select Open with > COBOL 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.

Note: For the instances imported from Pacbase, the skeleton language of the local generation is identical to the Pacbase skeleton language. The language value is passed on when the Pacbase data is extracted and imported. It is stored in the Library.
Selected Data Structures
This field displays a tree with the Data Structure from which you opened the wizard, and its constituting Segments.

The Data Structure is selected by default. So the Copybooks indicated on all of its Segments are generated by default.

To generate the Copybooks indicated on some Segments only, select the appropriate Segments.

Destination
This field must contain the entire path to the destination file where the COBOL descriptions are to be generated.

This file must have a .cpy extension. The file name defaults to the Data Structure name.

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.
Table 1. Values of the generation type
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. These comments will be used by VAP Connector.
DSQC3 Besides the generation of Segment COBOL source, generation of the Data Element and Segment description lines in the form of comments. These comments will be used by VAP Connector.
Data Structure code
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 the file name used in the programs and in the COPY clause.

This file name is eight-character long maximum.

COBOL location
Select the location of the description in the generated program.
Table 2. Values of the COBOL location
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 Pacbase automatically generates all REDEFINES.

V Generation of a variable file.
Type of COBOL to generate
You must specify which type of COBOL the generated description will be adapted to. This adaptation does not apply to the USAGE clauses.
Note: Some variants are deprecated or not supported.
Table 3. Values for the type of COBOL to generate
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 which type of Data Element format is to be used in the description.
Table 4. Values of the format type
Value Meaning
E Description using input formats
I Description using internal formats with their associated 'usages'
S Description using output formats
Record type
In this field, you can specify different ways of arranging the records of a Data Structure in the description.
Table 5. Values of the record type
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 is included in the COBOL FILE SECTION, the level number must be 2
2 Continuous sequence of records. It includes the initial values entered on the Segment -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 is included in the COBOL FILE SECTION, the level number must be 2.

This type of description is used only 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 provides an 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 the common part and specific parts are repeated or not).

This type of description is used only 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.
Table 6. Values for the level number of the record
Value Meaning
1 Level 01 for Data Structures and records.

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

If the Data Structure has no common part and has a Record type other than 'blank', the file level is not displayed.

2 Level 01 for Data Structures and 02 for records. Level 01 is not displayed 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 Structures are selected.

The selection is constituted of the selected record codes, which can be sorted.

To select the common part of a multirecord file, you must specify it explicitly.


Terms of use | Feedback

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