Standard Data Set (Fixed Format)

The following figure illustrates a standard data set with a fixed format.

Figure 35. Standard Data Set (Fixed Format)

Standard Data Set (Fixed Format)


All data blocks in a fixed-format standard data set contain records of the same type and size. Records are not maintained in logical order. Blocks in embedded standard data sets can contain records belonging to different masters. Record 0 contains neither data nor control information.

Data blocks can contain both in-use and available areas. Available space is not maintained contiguously within blocks. An available space table (DKTABLE) is used to keep track of available records. When a record is deleted, its AA word is placed in the DKTABLE. When a new record is created, it reuses an available space if there is one; otherwise, new space is allocated at the end of the file. The DKTABLE is used as a stack; the last record deleted is the record used by a create and store operation.

For fixed-format standard data sets with a REBLOCK option specified, a DKTABLE might be present even if no records have been deleted from the data set. These records are deleted by the Accessroutines to consolidate small blocks in the big blocks and are marked as available records.

Each DKTABLE segment is 30 words in length. The first segment of the DKTABLE starts on a block boundary, but contains no information. A DKTABLE cannot contain addresscheck or checksum words.

DKTABLE Format

The following figure illustrates the DKTABLE format of a standard data set with a fixed format.

Example 23. Standard Data Set (Fixed Format) DKTABLE Format

            WORD
              0      Number of valid AA words in this segment.
              1      ---
                      .
                      .    AA words of available records.
                      .    The value n is taken from word 0.
                      .
                      .
              n      ---
                     ---
                      .
                      .    Unused.
                      .    Only the last segment of the DKTABLE can
                      .    be partially full, that is, have fewer
                      .    than 29 AA words.
                      .
              29     ---

LASTRECORD Format

The following figure illustrates the LASTRECORD format of a standard data set with a fixed format.

Example 24. Standard Data Set (Fixed Format) LASTRECORD Format

WORD
            0      Number of segments in the DKTABLE minus 2.
            1      AA of the first never-used record.
            2      Segment address of the first segment
                   of the DKTABLE.
            3      Contains the value of 0 or 1.
                   0 indicates that the last segment of the
                   DK table is empty (not the entire DK table).
                   1 indicates that there are entries in the DK table.
            4      Last Record Serial Number (RSN) allocated.
            5      Reserved.
                    .
                    .
                    .   Unused.
                    .
           29      ---


Standard Data Set (Fixed Format) Restrictions

The following restrictions apply to standard data sets with a fixed format:

  • Standard data sets can be disjoint or embedded.

  • Sets must be declared for all embedded standard data sets.

  • FIND NEXT and FIND PRIOR operations are not allowed for embedded standard data sets.

The restrictions on the standard data sets with a fixed-format are for the following reasons:

  • Fixed-format standard data sets use disk space very efficiently. Additional space is allocated for the file only when all available record spaces have been exhausted.

  • Creation, deletion, and modification of records are efficient. Records are neither linked nor ordered. A portion of the DKTABLE resides in memory while the database is open.

  • Disjoint standard data sets can be accessed in physical order using FIND NEXT and FIND PRIOR operations. The INVALIDTEXT error produced by the DASDL compiler is used to set certain items to null when a record is deleted. In-use records are selected by performing a valid record test upon these items. Records that do not satisfy the VALIDRECORDTEXT condition are assumed to be deleted. This test, where possible, is made on a single required item. If no such item exists, all data items must be examined to determine the validity of the record. Since in-use and deleted records can be intermingled, several deleted records can be examined before a valid record is located. Increasing the block size setting generally improves the performance of the operation.

  • Embedded standard data sets can be accessed only by sets and subsets since records are not physically grouped by master. Accessing all records under one master does not, in general, benefit from a large block size setting.