Database Block Definition tab

In this tab, you specify the logical information that is necessary to generate the Block in a source language, the Data Description Language (DDL).

External name
This name is required upon generation.

It will be used to produce a .dll file (for a relational Block) or a .txt file (for the other Blocks) in the COBOL project and file that are indicated in the COBOL target.

Several Database Blocks can have the same external name in a location. The generation of Database Blocks with the same external name is managed with the option Allow the generation to override generated files from another design in the Pattern Driven Programming preferences. With this option, a Database Block can then be generated, even if it has the same external name as another Database Block that is already generated in the location. In this case, after the new generation, the former file generated from the other Database Block is automatically removed whereas the new generated file is nested under the new Database Block.

Block type
Select the Block type, which is the generation variant.

For hierarchical or network databases, entering the definitive Block type is not required upon creation. Selecting a network or hierarchical structure is enough when you define a Database Block. You must select a specific physical type when you generate the Data Description Language (DDL).

You can change the Block type only inside the same category (the Hierarchical category for example).

The following tables present all the available types. The deprecated generation variants cannot be used to generate.

Table 1. Hierarchical databases
Generation variants Generatable variants Deprecated variants
DL: DL/1 logical DBD X  
DP: DL/1 physical DBD X  
DR: DL/1 physical DBD (access keys only) X  
IP: DL/1 primary index X  
IS: DL/1 secondary index X  
LF: AS/400 logical file   X
PC: PCB X  
PF: AS/400 physical file   X
PS: PSB X  
SA: TANDEM DDL   X
SO: SOCRATE structure   X
SS: SOCRATE substructure   X
Table 2. Relational databases
Generation variants Generatable variants Deprecated variants
Q2: DB2 X  
Q3: SQL SERVER X  
QB: DB2/2 et DB2/6000 X  
QC: DATACOM/DB X  
QN: NONSTOP SQL   X
QP: ORACLE (from version V7.0) X  
QR: RDMS   X
QS: SQL/DS   X
QT: INTEREL RDBC   X
QU: INTEREL RFM   X
QY: SYBASE   X
Table 3. Network databases
Generation variants Generatable variants Deprecated variants
20: DMSII   X
DB: DB2 (see the note after the table)   X
D0: IDMS DDL Schema   X
D2: IDMS DMCL Schema   X
D4: IDMS Subschema   X
I1: IDS2 DDL Schema X  
I2: IDS2 DMCL Schema X  
I3: IDS2 Subschema X  
M1: DM4 DDL Schema (elementary fields)   X
M2: DM4 DMCL Schema   X
M3: DM4 Subschema   X
M4: DM4 DDL Schema (group fields)   X
S1: DMS Schema   X
S3: DMS Subschema   X
TD : TANDEM   X
Note: Use the relational Q2 : DB2 type rather than the DB : DB2 type. The TRDQ Pacbase procedure can be used to transform the DB types into Q2 types before the migration.
Schema name
It is the physical name of the schema to which the Block is attached.

Enter this name on 8 characters maximum.

This name is only used for SE-type Blocks (group of Sets) and for CODASYL Blocks.

It is necessary at generation time if the Block is a subschema or a DMCL.

This field is not used if the Block is a schema.

Version number
For ORACLE V7, enter 7000. For all the other Block types, do not enter anything.

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 is kept, Default is displayed between parentheses next to the project. However, if it is explicitly changed in the instance, only the project is displayed in this field, without any other indication. If it is 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 list.

If you change the project, the COBOL folder is automatically set to the default value (rpp). The new project then applies to the next generation.

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

The folder of the corresponding design file is the default folder. If it is kept, Default is displayed between parentheses next to the folder. However, if it is explicitly changed in the instance, only the folder is displayed in this field, without any other indication. If it is 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 is kept, you can specify a root path for the generated files in the Properties wizard (accessed by clicking Change project properties). This path is automatically inserted in this field, at the beginning of the folder.

You can select a new folder in the 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 applies to the next generation.

Change project properties
Click to open 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.
Generation option
This field is available for relational Blocks only. The following options can be selected:
  • C1: Generation of the DDL in creation mode (CREATE DATABASE and CREATE all the objects of the Block).
  • C2: Generation of the DDL according to the value selected in the Generation transaction type field of the -DR Lines tab.
  • C3: Generation of the LABEL command for DB2 Blocks only.
  • C4: Generation of the COMMENT command for DB2 Blocks only.

    The date, time, and session number will be displayed on the first line of the generated program.


Feedback