The physical information necessary to generate the Database
block is entered on the -GG Lines section associated
with the Block in the -G lines tab, in order
to complement the logical information entered on the Database Block
Definition.
This section consists of a table in which
you can modify the information contained in the Block Description
lines before they are generated. Depending on the type of description
line, the System automatically displays lines, in order to guide you
when you enter the Block's physical information. These lines
are identified by 'VIRT' or 'GUID' in the last
field of the table. Collectively, these lines are called 'virtual'
lines. The lines identified by 'VIRT' are generated. You
can create new lines and override the 'virtual' lines generated
by the DBD function if you want to modify them. A 'G' entered
in the Type field means that the lines are
to be taken into account at generation time.
In
the table you find the following input fields:
- Type
- When you click this field, a dropdown list allows you to select
a line-type. You can choose between:
- Description
- This field must be used to enter the generation elements or comments
you want to be generated. Its content depends on the type of Block
and type of line selected.
Lines associated with DL1 Database Blocks
- Lines associated with a Physical DBD:
Several virtual
documentation lines are associated with an 'IP'- or 'IS'-type
Database Block. VA Pac does not have the necessary information to
determine the characteristics of a given Index (ACCESS, PASSWD, DATASET,
etc.). Therefore, the generated virtual lines must be completed by
the user to provide this information.
- Lines associated with a Physical DBD (Type of Block = DR):
The definition of a 'DR'-type block is identical to
that of a 'DP'-type block. All of the Data Elements called
into a Segment used in a 'DP'-TYPE Database Block are generated
as 'FIELD' statements. You may want to reduce the DBD description
to just those Data Elements used as access keys. With the 'DR'-type
Database Block, it is possible to generate as 'FIELD' statements
only the Data Elements which are identified by an alphanumeric character
in the Acess Key field, labeled 'K',
on the Segment's -CE Lines tab. The Virtual
lines are identical to those of the ″DP″-type Database Block.
- Lines associated with a Logical DBD (Type of Block = DL):
The generated lines (Block Name and 'ACCESS=LOGICAL″) are
sufficient and do not have to be rewritten by the user.
Lines associated with Relational databases
For Relational Database
Blocks, virtual lines are automatically generated for each SQL record
type (Table, View, Index...). For example, you can modify the characteristics
of a column or specify the source of a column in a View.
- To override a column's pre-defined values, you identify
the column by its Data Element code. After identifying the Column,
you click Override and enter another value.
The generated 'Virtual' lines indicate where to place the insertion
lines via '—> COLUMNS INSERTION BEGINNING<--' and '--> COLUMNS
INSERTION END <—'. To override the Column's pre-defined values,
you identify the Column by its Data Element code left-justified between
a '<' sign and a '>' sign. These delimiters must be six positions
apart. After identifying the Column, you enter the desired values.
To complete the generated data, you enter, after LIBFO a space and
the 'ADD' keyword, followed by the data of your choice. Enter the
end mark on the column declaration line because it will not be automatically
generated.
Example: Modification of
a Column format:
G CREATE TABLE (EXTERNAL NAME) IN DATABASE-NAME
G ---> COLUMN INSERTION BEGINNING <---
G LIBFO
G DO10LIBFO FLOAT
G ---> COLUMN INSERTION END <---
G IN DATABASE-TABLESPACE
In this case,
the name will be
DO10LIBFO, the format
will be
FLOAT. This method cannot be
used to delete a Column. For DB2, the comma (separator) is generated
at the end of each line. In order to avoid this generation, a
& must be inserted after the last non-blank character
of the line.
- Source columns:
To insert a Column into a Table, the
same technique as above is used, you must insert line(s) between the
beginning and the end of the insertion area, which is indicated on
virtual lines. In order to override a source Column of a Column in
a View, you must create a 'G'-type line formatted as follows:
FFNNDELCO
FFNNDELCO being the code entered in the SOURCE
COLUMN field.
Example: G CREATE VIEW (VIEW NAME)
G ---> COLUMN INSERTION BEGINNING <---
G <LIBFO>
G DO10LIBFO FLOAT
G ---> COLUMN INSERTION END <---
G AS SELECT ALL
G ---> SOURCE COLUMN INSERTION BEGINNING <---
G <FFNN-DELCO>
G 'X'
G ---> SOURCE COLUMN INSERTION END <---
G FROM (SOURCE TABLES NAME)
You
must manage the Source Table (after the FROM clause).
Lines associated with CODASYL Databases
- TANDEM
- COMPLEMENT TO THE GENERATED LINES :
In the -GG lines section,
you specify the physical characteristics of the TANDEM database and
its components, as well as all the information about insertion modes.
You can therefore create new lines, as well as modify or delete lines
that have been automatically generated, by inserting a new line in
the adequate location, or by overriding a line
Example: Overriding a virtual line:
G RECORD < RECORD NAME >
G RECORD SS00
- OVERRIDING A DATA ELEMENT
You must create lines included inside
the ″Begining of insertion″ and ″End of insertion″ boundaries. To
″override″ a Data Element, you must specify <DELCO > on the first
line, and the new description on the following lines. If you do not
want the new Data Element to appear, do not create any line after
this first line. You must enter at least six characters between the
two delimiters.
Example: G RECORD < RECORD NAME > .
G FILE IS < FILE NAME > .
G KEY-SEQUENCED .
G ---> ELEMENT INSERTION BEGINING <---
G<NUCLIE>
G 10 NUCLIE PICTURE X(8).
G ---> ELEMENT INSERTIOM END <---
G KEY IS < FIELD NAME > .
The lines that you want to have included in the generation must
be marked by a'G'-type line.
- DSMII
You can insert comments, commands, descriptions,
labels, print requests wherever you wish to in the generated structure.
You can also erase and replace the description the System generates
automatically. Comment lines can be inserted too on the -GG lines.
Lines with a type '*' are used to document description lines,
they are not taken into account at generation. Several types of lines
are available for the user to insert. Two types of insertions are
possible:
- within an element definition lines ;
- within a particular item of the element.
All the lines concerning the entity definition must be at the
beginning, all the lines concerning an ″item″ must be consecutive.
- Items:
The Data Element code is indicated between the
< and > symbols on a general documentation line of the affected
entity:<datel >. This notation is taken into account
in the Data Element utilization definition. In a dataset or a ″remap″
description, the Data Element marked this way does not interfere in
the generation and must not have any line type. For ″access″, set
and subset, Data Elements marked this way are taken into account for
the generation and they must have a type.
- Data indication:
Most often, this is performed from
column two. If the data description starts in column one, a semi-colon
line is inserted before the line generated for this data.