Rational Developer for System z, Version 7.6

-GG Lines in a Database block

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:
  • * : comment lines to be generated,
  • V: lines generated before the automatically generated elements.
  • G: line generated instead of the automatically generated elements.
  • P: lines generated between the element automatically generated parts and its description
  • Z: lines generated after the automatically generated elements.
    Note: P and Z types are available only for -GG lines associated with the CODASYL Blocks' definition and -DC lines.
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 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


Terms of use | Feedback

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