Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Determining the file format

The final file format is reflected by the attributes BLOCK-CONTROL-INFO (or BLKCTRL) and BUFFER-LENGTH (or BLKSIZE). These are not determined until the file is opened (OPEN macro, OPEN mode OUTPUT or OUTIN). The following factors are decisive for the file format:

  • the values specified for FCBTYPE, BLKCTRL and BLKSIZE; the TFT, FCB and the catalog entry are used as sources from which the decisive input values are obtained during OPEN processing (see chapter "OPEN processing")

  • the format of the actual file location (K, NK2, NK4)

  • the preformat: For files with CREATION-DATE=*NONE, this is the value of the FILE-PREFORMAT attribute. For files already possessing a CREATION-DATE, this is the current file format (derived from the existing attributes FCBTYPE, BLKSIZE and BLKCTRL).

Usually, the specified attribute values are taken to determine the file format, or the following defaults are assumed:

File preformat

Default for BLKSIZE

K / NK2

(STD,1)

NK4

(STD,2)

File preformat

FCBTYPE

Default for BLKSIZE

K

PAM / SAM / ISAM

PAMKEY

NK2 / NK4

SAM

DATA

NK2 / NK4

PAM

NO

NK2

ISAM

DATA2K

NK4

ISAM

DATA4K 1)

1)If FCBTYPE=ISAM and BLKCTRL=DATA4K, any specification of BLKSIZE=(STD,n) with an odd number for “n” will be rejected. The default value is always (STD,2).

The following modifications are applied during OPEN processing if the resulting file format is incompatible with the file location, or if any specifications are incompatible with the access method:


Old file preformat

New file preformat

BLKCTRL=PAMKEY

NK2 / NK4

K

BLKCTRL not equal PAMKEY and
BLKSIZE=(STD,n) where n is odd

NK4

NK2

 

FCBTYPE

Old BLKCTRL value

New BLKCTRL value

SAM

DATA2K / DATA4K / NO

DATA

PAM

DATA2K / DATA4K

NO

ISAM

DATA / NO

  • DATA4K,if the resulting preformat is NK4

  • Otherwise DATA2K