Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

File attributes

In order to make the following easier to read, reference is made exclusively to the operands of the FILE and FCB macros. The equivalent operands of the command are listed in a table at the end of this section.
Access method and file format

The access method is specified via the FCBTYPE operand, where ISAM is the default value. Depending on the value specified for the BLKCTRL operand, the file is processed with NK-ISAM or with K-ISAM.

The file format (BLKCTRL=DATA/PAMKEY/NO) refers to the internal structure of the file: for NK-ISAM, the block control information is kept in the PAM block itself
(BLKCTRL=DATA), not in a separate PAM key. K-ISAM uses this PAM key: BLKCTRL=PAMKEY. The format BLKCTRL=NO (= no block control field) is, for ISAM, equivalent to the entry BLKCTRL=DATA.

Structure of a PAM page

K-ISAM: the block control information is kept in a PAM key which precedes the PAM page, and the first 16 bytes of the PAM page are available for user data.

NK-ISAM: each PAM page begins with a 16-byte block control field, the last 4 bytes of which contain ISAM-specific information.
The usable length of a PAM page is thus 2048 – 16 = 2032 bytes.

NK2 files: each first PAM page of a logical block begins with a 16-byte block control field, the last 4 bytes of which contain ISAM-specific information.
The usable length of the first PAM page is thus 2048 – 16 = 2032 bytes.

NK4 files: each physical page (4096 bytes) begins with a 16-byte block control field, the last 4 bytes of which contain ISAM-specific information.
The usable length of each page is thus 4096 – 16 = 4080 bytes.

Record and block formats

Fixed-length and variable-length records, specified via the operand RECFORM=F/V of the FILE command, can be processed with ISAM. The record format affects the possible definitions of the record length and key position (see section "ISAM file structures").

The record length is defined via the RECSIZE operand. For variable-length records, the user should remember that the first 4 bytes of the record are used for the record length field and a control field. Furthermore, RECSIZE then specifies the maximum permissible record length instead of the actual record length. If a file contains records which are longer than specified in RECSIZE, only the number of bytes specified in RECSIZE is returned by a read operation.

For fixed-length records, the entire record length specified in RECSIZE is available for user data. When specifying RECSIZE, however, the user should note that ISAM still places a 4-byte record length and control field at the beginning of each record, and that this may cause overflow blocks to be generated.

The maximum permissible record length is always the block size (BLKSIZE).

The blocking factor specified in the BLKSIZE operand defines the number of PAM pages which are to form a data block:
BLKSIZE=(STD,n), where 1 <= n <= 16.

The block size – and the record length – should always be selected such that no overflow blocks will be created, since this leads to a drop in performance.

Index structure

The ISAM index is formed from the ISAM key and the flags. It may be anywhere within the record, but must not extend into an overflow block. The maximum permissible index length is 255 bytes, and the minimum length 1 byte. Flags are evaluated with the aid of the GETFL macro.

The ISAM index begins with the key, whose starting position in the record is defined via the KEYPOS operand. The default value for KEYPOS depends on the record format: KEYPOS=5 for RECFORM=V, KEYPOS=1 for RECFORM=F. The key length is defined via KEYLEN; by default, DMS generates an 8-byte key.

The operands VALLEN and LOGLEN apply to the flags. The VALPROP operand has no function in NK-ISAM. It is provided only for reasons of compatibility, since it is used in K-ISAM to control inclusion of the value flag in the index entry.

The table below lists the above-mentioned operands of the FILE and FCB macros and their equivalent operands in the ADD-FILE-LINK command.

Operand in the FILE and FCB macros

Operand in the ADD-FILE-LINK command

FCBTYPE

ACCESS-METHOD

BLKCTRL=DATA/PAMKEY/NO

BLOCK-CONTROL-INFO=*WITHIN-DATA-BLOCK / *PAMKEY / *NO

RECFORM=F/V

RECORD-FORMAT=*FIXED / *VARIABLE

RECSIZE

RECORD-SIZE

BLKSIZE

BUFFER-LENGTH

KEYPOS

KEY-POSITION

VALLEN

VALUE-FLAG-LENGTH

LOGLEN

LOGICAL-FLAG-LENGTH

VALPROP

PROPAGATE-VALUE-FLAG

Table 55: ISAM operands in FILE/FCB and ADD-FILE-LINK