com.ibm.pdp.maf.rpp.pac.blockbase

Interface AbstractBlockBase

    • Method Detail

      • getBlockType

        BlockBaseTypeValues getBlockType()

        Indicates the type of the BlockBase.

        These types are classified into 4 categories : Codasyl, Relational, Hierarchical and Socrate BlockBase.

        Returns:
      • getExternalName

        java.lang.String getExternalName()

        The external name of the BlockBase is necessary at generation time.

        For Codasyl BlockBases, it is the physical name of the generated DDL (Data Description Language).

        Returns:
      • getGenerateFolder

        java.lang.String getGenerateFolder()
        Returns:
      • getGenerateProject

        java.lang.String getGenerateProject()
        Returns:
      • getGenerationLibrary

        Library getGenerationLibrary()

        Indicates the Library on which we can find the generation parameters for the entity.

        These parameters are related to the adaptation to the operating system in use.

        Returns:
      • getGGLines

        java.util.List<GLine> getGGLines()

        HIERARCHICAL BLOCKBASE

        •Physical DBD:

        The virtual lines associated with a description line of a physical DBD retrieve the Segment descriptions as defined in the Dictionary.

        They do not need to be rewritten.

        A 'FIELD' description can be modified at this level, between the beginning and the end of the insertion area, indicated on virtual lines.

        On the first line, you have the Data Element code corresponding to the FIELD to be modified, left-justified between a 'less than' sign () and a 'greater than' sign (>).

        These delimiters must be six positions apart (example: ).

        G FIELD NAME=(NUM,SEQ,U),BYTES=7,...

        •Logical DBD:

        The virtual lines associated with a description line of logical DBD retrieve, for each Segment of the DBD, the name of the Segment and the name of the parent Segment.

        Each line identifies the source of the Segment like this example :

        SOURCE = ((name of segment,,name of DBD))

        •Index:

        The virtual lines associated with the Index BlockBase description line retrieve the Segment description from the Dictionary.

        VA Pac does not have the necessary information for the description of a given Index (LCHILD, etc.).

        Therefore, you must complete the virtual lines.

        •PCB:

        No virtual lines are associated with a PCB BlockBase.

        A PCB description can be modified through the virtual lines associated with the description lines of a PSB using this PCB.

        •PSB:

        The virtual lines associated with PSB description lines retrieve the segment description(s) making up the called PCB from the Dictionary. They do not need to be rewritten.

        A 'SENSEG' description can be modified at this level, between the beginning and the end of the insertion area, indicated on virtual lines.

        On the first line, the Segment code corresponding to the SENSEG to be modified is entered, left-justified between a '' sign and a '>' sign.

        These delimiters must be four positions apart (example: ).

        Example:

        G SENSEG NAME=CLCDE,PARENT=COCRD,PROCOPT=G

        CODASYL BLOCK

        Using the virtual lines, you can specify the physical characteristics of the areas and sets (DMCL), including the information related to sort keys and insertion modes.

        RELATIONAL BLOCK

        Virtual lines are automatically generated for each SQL record type (Table, View, Index...) .

        For example, the characteristics of a column can be modified or the source of a column in a View can be specified.

        • Overridden columns

        The generated 'Virtual' lines indicate where to place the insertion lines via '--> COLUMN INSERTION BEGINNING --' and '--> COLUMN 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 , a space and the 'ADD' keyword, followed by the desired data. 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

        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' column

        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, 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 being the code entered in the SOURCE COLUMN field.

        Example:

        G CREATE VIEW (VIEW NAME)

        G ---> COLUMN INSERTION BEGINNING ---

        G

        G DO10LIBFO FLOAT

        G ---> COLUMN INSERTION END ---

        G AS SELECT ALL

        G ---> SOURCE COLUMN INSERTION BEGINNING ---

        G

        G 'X'

        G ---> SOURCE COLUMN INSERTION END ---

        G FROM (SOURCE TABLES NAME)

        You must manage the Source Table (after the FROM clause).

        Returns:
      • getGOLines

        java.util.List<GLine> getGOLines()

        In a BlockBase, the following options are available:

        •'Default punctuation'

        With this option (COMMA=YES), the punctuation will be automatically generated at the end of the lines on which you have added or modified the characteristics of columns in the Generation Elements sub-tab of the BlockBase Description Lines.

        •'No default punctuation'

        This is the default option of all the SQL BlockBases, except DB2 SQL, SQL/DS and ORACLE V5.

        With this option (COMMA=NO), you must enter the punctuation when you add or modify the characteristics of columns in the Generation Elements sub-tab of the BlockBase Description Lines.

        •'No generation of VA Pac Constants in Comments'

        Select this option (COMMENT=NO) to prevent generating the VA Pac Constants in the Comments when generating the BlockBase.

        •'Generation of COMMIT statements'

        With this option (COMMIT=YES), a COMMIT statement is generated each time an SQL object is cancelled ('DROP'). In the same stream, you can then cancel and re-create the same object.

        •'No standard prefixing'

        If you select this option (PREFIX=NO), the standard prefixing of the Tables' and Views' external names will not apply in this BlockBase. For information on the standard prefixing, read the 'Prefixing Mode' paragraph in the external name help page.

        With this option, an external name which does not include a dot or a prefix will be generated as is, and an external name entered as '.NAME' will be generated with a prefix which is the user's code.

        •'Return code set to '06'

        With this option (RETCOD=06), the return code is set to '06' instead of '08' when errors are detected upon the BlockBase generation. The generation sequence does not stop and goes to the next step.

        •'Generation of Date, Time and Timestamp fields (NonStop Tandem)'

        With this option (TIME=YES), Date (with the 'MM/DD/YYYY' format), Time and Timestamp fields will be recognized in NonStop BlockBases whose version number is 'Other Systems, all versions'.

        •'No generation of Date, Time and Timestamp fields (NonStop Tandem)'

        With this option (TIME=NO), Date (with the 'MM/DD/YYYY' format), Time and Timestamp fields will be rejected in NonStop Blockbases whose version number is 'Other Systems, all versions'.

        •'No conversion of lowercase into uppercase'

        With this option (UPPER=NO), lowercase letters will not be converted into uppercase letters upon generation.

        •'All descriptions'

        With this option (DESCR=ALL), the complete description of the Segments which constitute DB2 Tables will be generated.

        Returns:
      • getType

        BlockBaseCategoryValues getType()

        Gives the category of the BlockBase :

        - Relational

        - Hierarchical

        - Codasyl

        - Socrate

        Returns:
      • getVersionNumber

        java.lang.String getVersionNumber()

        Indicates the version number of the Database system for Relational BlockBases.

        Values :

        - 3000 : for NONSTOP SQL BlokcBase (QN type), Version C30

        - 5000 : for RDMS BlockBase (QR type), Version 5RA4

        - 7000: for ORACLE V7 BlockBase (QP type)

        - Blank : Other systems, all versions.

        Returns: