com.ibm.pdp.maf.rpp.pac.program

Interface CDLineDataStructure

  • All Superinterfaces:
    CDLine, Element


    public interface CDLineDataStructure
    extends CDLine

    CDLineDataStrucure are used to describe three basic types of elements, which are specified in the Organization field:

    • Standard files,

    • Database Blocks,

    • Work areas or linkage areas.

    For each external resource, you have its:

    • Physical characteristics, which, along with the type of COBOL code, generate the SELECT clauses and ensure adequate physical accesses,

    • File matching criteria, controlled by three different fields (for input Data Structures):

      • Sort key, which identifies the keys to match on, arranged in hierarchical order,

      • Number of control breaks, which specifies how many control breaks there are,

      • Synchronization level, which specifies the number of levels to match.

    • The generated description type: Several description variants can be defined from the Data Structure descriptions contained in the Library. These variants are:

      • The format type used,

      • The selection of certain Segments, taken from the various Data Structure descriptions in the Library,

      • The selection of certain reserved Data Elements or groups of Data Elements,

      • The record description mode (redefined or not, repeated...), and the COBOL level number,

      • The location of the generated description in the DATA DIVISION (this location can vary from one record to another),

    • Use characteristics, which generate input/output processing, and other standard processing (check, update, printing...).

    • Method Detail

      • getBreakLevel

        int getBreakLevel()

        For sequentially accessed, sorted files, it is the number of Data Elements (elementary or group) on which a control break processing is specified for the Data Structure.

        O is the default value.

        1 to 9 levels, according to the number of Data Elements to be used for control break processing. These Data Elements are identified as the Sort key composition field for this Data Structure.

        When there is a control break processing on a Data Structure, two indicators keep track of the status of the records being processed

        Below, the term 'umpteenth key Data Element' includes all the key Data Elements up to and including the umpteenth level:

        • dd-IBn = '1': the umpteenth key Data Element of the current record of the dd Data Structure contains a new value

        • dd-FBn = '1': the umpteenth key Data Element of the current record of the dd Data Structure contains the last occurrence of the present value.

        When these files are synchronized with others, the control breaks are kept synchronized through two additional switches:

        • ITBn = '1': A new value in the umpteenth key Data Element has been detected. It signals the beginning processing on all synchronized Data Structures.

        • FTBn = '1': The present value of the umpteenth key Data is occurring for the last time. It signals the end processing for the records in this iteration for all synchronized Data Structures.

        For output files (Usage set to D: Output file): A value other than zero creates a duplicate file layout to be generated in the WORKING-STORAGE SECTION, prefixed by 1-. However you are advised to specify it in the work areas, using micropatterns.

        Returns:
      • getDataStructureCalls

        java.util.List<DataStructureCall> getDataStructureCalls()

        List of the DataStrucutre called.

        Returns:
      • getFileStatus

        java.lang.String getFileStatus()

        This field is optional.

        If specified, it is a character string, on 10 characters maximum, in the following format:

        ddsseeeeee, where:

        • dd = Data Structure

        • ss = record (00 is recommended)

        • eeeeee = Data Element

        The use of this field varies according to the Type of COBOL code and to the Data Structure call Organization.

        • For non-VSAM files and all environments except BULL GCOS8:

          • Generation of the nominal, symbolic, or actual key, according to the Type of COBOL code.

          • You must define the corresponding work area (or example, 1-ddss-eeeeee). You must also specify, in specific code, the positioning of this key and the reading of the Data Structure.

        • For VSAM files:

          • Generation of the return code area of input/output operations,

          • Generation of the corresponding VALUE OF clause, only if it is defined as a work area and specified in specific code.

        • For BULL GCOS8:

          • Identification of the Data Structure,

          • Generation of the corresponding FILE STATUS IS clause, provided if it is defined as a work area and specified in specific code.

        Returns:
      • getRecordTypeDataElementCode

        java.lang.String getRecordTypeDataElementCode()

        Code of the Data Element whose values identify the different record types of a Data Structure.

        This Data Element must belong to the common part Segment (00 Segment).

        This name can also be specified in the Structure code field of the Segment Definition tab.

        Returns:
      • getResultDataStructureCode

        java.lang.String getResultDataStructureCode()

        If the Data Structure has a Usage set to P: Principal, it is the Code in program' of the result output Data Structure (two characters).

        If the Data Structure has a Usage set to R: Result or D: Output file, it is the Code in program of the principal input Data Structure (two characters).

        Returns:
      • getSortKeys

        java.lang.String getSortKeys()

        It is the group of the Data Elements which make up the sort key for control break processing.

        They are identified by the value entered in the Sort key field on the Segment -CE Lines tab.

        The order for sorting these key Data Elements can be entered here. To do so, you use the values assigned on the -CE Lines tab in the appropriate order, from major to minor - left to right.

        If you do enter anything here, the Data Elements coded with value 1 - 9 are taken as the default.

        Note: For transaction files, include the 'action code' and 'record type' Data Elements as a part of the key. The order in which these Data Elements are sorted determines the sequence in which the transactions update the principal file, and the policy for duplicate record detection.

        Returns:
      • getSourceDataStructureCode

        java.lang.String getSourceDataStructureCode()

        If the Data Structure has a Usage set to:

        • M: Transaction to be validated or N: Transaction not to be validated, it us the Code in program (on two characters) of the transaction file which contains the errors (Usage set to E: Transaction with error checking), if such a file has been called.

        • E: Transaction with error checking, it is the Code in program (on two characters) of the corresponding transaction file (Usage set to M: Transaction to be validated or N: Transaction not to be validated).

        S: Selected, you must enter the Code in program (on two characters) of the input source. On the source Data Structure call line, you must enter the Code in program of the selected Data Structure.

        Returns:
      • getSyncLevel

        int getSyncLevel()

        For sequentially accessed files, this field is used to set the synchronization of two or more files.

        O is the default value.

        1 to 9 levels. Enter the number of Data Elements (elementary or group) on which a file matching is to be synchronized for this Data Structure. This number identifies the number of the key fields (identified in the Sort key composition field) that are involved in the synchronization.

        For an automatic synchronization, the following conditions must be met:

        • The Data Structure control break level must be equal to the synchronization level - 1. However for a transaction Data Structure, the control break level must be equal to or greater than the file synchronization level.

        • The Data Elements which constitutes the sort keys of a Data Structure must be sorted in ascending order.

        • The Data Elements which constitutes the sort keys of a Data Structure must have the same length for the same level.

        These Data Elements must have a display format (if they are numeric, they must be whole numbers and unsigned).

        The switches generated to control file synchronization are:

        • dd-CFn: It indicates whether a file must be processed or bypassed in this iteration (1 = process or 0= bypass).

        • dd-OCn: It indicates the status of processing on a record of a principal file (Data Structure with a 'P: Principal' usage.)

        • For sequentially accessed files:

          • 1 = WRITE to the principal file

          • 0= do not WRITE

        • For direct-access files:

          • 1 = CREATE or REWRITE

          • 0 = DELETE

        Returns:
      • getTransactionBreakLevel

        int getTransactionBreakLevel()

        In a transaction file, it is the position, within the sort key, of the Action code (entered on the Segment Definition tab).

        Example: If the value of the Sort key is ABCDE and the Action code is D, the value is 4.

        It is the most minor key of the sort key. It is used to differentiate one type of transaction from another in the same principal file. Duplicates are detected if any key elements below this one are found to match.

        By default, the value of this field is that of the Break level already entered in the previous window. The value must be one-character long.

        Note: All spaces are replaced with zeros.

        Returns: