Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Processing attributes

This section describes the processing attributes of ISAM files. These include shared-update processing and the opening of files, which are described separately in section "Sharedupdate processing" (Shared-update processing) and section "Opening an ISAM file", respectively.

File link name and pool link name

The file link name links the file to the file control block in the program via the TFT (task file table) (see section "Access via the file link name").

If an NK-ISAM file is to be processed in a user ISAM pool, a pool link name must be specified in POOLLNK operand of the ADDPLNK macro or in the POOL-LINK operand of the ADD-POOL-LINK command to connect the file to the desired pool. The pool can be created using the CREPOOL macro or CREATE-ISAM-POOL command. The pool link name is then defined by means of the ADDPLNK macro or the ADD-POOL-LINK command. If POOLLNK is not specified in either the FILE or the FCB macro or POOL-LINK in the ADD-FILE-LINK command, the related NK-ISAM file is processed in a standard pool. K-ISAM files cannot be processed in ISAM pools.

Duplicate keys

The user may specify in the FILE/FCB macro (operand DUPEKY) or in the ADD-FILE-LINK command (operand DUPLICAT-KEY) that several different records in his/her file may have the same key. In NK-ISAM, DMS adds a time stamp to these records; this is not done for K-ISAM.

Block usage: PAD value

During sequential creation of a file with PUT, the user can specify via the PAD operand in the FILE/FCB macro or via the PADDING-FACTOR operand in the ADD-FILE-LINK command how much space is to be left free in each data block for subsequent updating. The default value is PAD=15, i.e. 15% of the space in each data block is left free. If a PUT macro would result in less free space in an existing block, a new data block is created for the next record.

For NK-ISAM files, a new data block is requested as soon as this limit is exceeded; K-ISAM requests a new data block before the limit is exceeded.

For sequential creation with PUT, the size of a file increases if the PAD factor is increased. However, subsequent processing of the file (STORE/INSRT) can be optimized by selecting a suitable value for PAD: the free space left in the data blocks should be so large that block splitting does not occur when the file is subsequently extended. In order to select the correct PAD value, it is thus necessary to estimate how much the file will grow.

If ISAM files are created using STORE, the PAD value has no effect on how the blocks are filled: STORE writes records into a block until it is full. If a further record is then written, block splitting occurs. The blocks are usually only 50% full.

Even if the file is created by means of PUT, but not via an I/O area in the program, the PAD has no effect (the I/O area is defined in the FCB with IOAREAn; see "Program buffer = I/Oarea in the user program"). Each PUT macro initiates a write operation and DMS attempts to place the new record in the current data block. A new data block is created only when the current block is full.

Overlapped reading

If an ISAM file is to be processed primarily sequentially, the user can use OVERLAP=YES in the FILE macro or the READ-IN-ADVANCE operand in the ADD-FILE-LINK command to specify that, whenever a data block is read, the next one is also read, “just to be on the safe side”. This may reduce the number of I/O operations. Overlapped reading is performed for both “forward” (towards end-of-file) and “backward” (towards beginning-of-file) read operations.

WROUT function

The WROUT function (or WRITE-IMMEDIATE function) controls how often updated blocks are written back to disk. If WROUT is active, the file on the disk is always kept consistent with its copy in virtual memory.

If WROUT is not active, a block is written back to disk only when its buffer is needed for another block. This delay saves write operations in cases where multiple updates are executed in the same block.

In ISAM pools which are not task-specific, WROUT=YES is set by default: updated blocks are always written back to disk immediately. Delayed writing to disk is also possible. This must be specified explicitly by the user in the CREPOOL macro or CREATE-ISAM-POOL command, as well as in the FILE macro or ADD-FILE-LINK command.

If a file is processed in a task-specific user ISAM pool, the WROUT function can be activated both in the FILE/FCB macro for the file and in the CREPOOL macro for the pool. If commands are being used, the WRITE-IMMEDIATE function can be activated in both the ADD-FILE-LINK command for the file and in the CREATE-ISAM-POOL command for the pool. If these two specifications differ, the one which activates the WROUT function is used.

Program buffer = I/O area in the user program

If a program uses its own I/O area, this must be at least as large as a data block (= n * 2048 BLKSIZE, where 1 <= n <= 16), as specified in BLKSIZE=(STD,n). By default, the system generates an I/O area in class 5 memory.

The existence of an I/O area defined by the user via IOAREA1/2 in his/her program is particularly advantageous for the sequential processing of ISAM files, since it reduces the number of SVCs:

  • sequential read operations (GET/GETR): in the first read operation, as many records as possible are transferred to the I/O area before the first record is returned to the program. For subsequent read operations, the records already in the I/O area are returned to the program. A new I/O operation is executed only when all of these records have been passed to the program.

  • sequential write operations (PUT): during the sequential creation or extension of a file, the records are collected in the I/O area until it is full (taking the PAD value into account) or until sequential processing is terminated by a call for another operation. Care should be taken that sequences of PUT operations are not interrupted by other actions, since each such interruption causes the contents of the I/O area to be written as a new data block and this can lead to blocks with relatively small amounts of data.

For NK-ISAM in move mode, the user can dispense with an I/O area (IOAREA1=NO in the FCB). In this case, each action macro call leads to an SVC.

Operating modes: Move mode and locate mode

ISAM actions are normally executed in move mode. Some ISAM actions can be executed in locate mode, which is selected using the operand IOREG. Since it is then not necessary to transfer records from and to an I/O area, slight performance improvements can be achieved in this manner for sequential processing. Locate mode is supported by NK-ISAM only for reasons of compatibility. For further details, see chapter "Access methods".