Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Block formats for tape files

A physical block is the unit of data transfer from or to an I/O device. The data between two inter-block gaps on a tape forms one physical block. Blocks of this type never extend beyond a tape boundary. There are two block formats for tape files: standard block formats and nonstandard block formats. Tape files are always processed by the device driver PTAM.

Standard block format

BLOCK-CONTROL-INFO=*PAMKEY, BUFFER-LENGTH=*STD(SIZE=n)

A standard block corresponds to n PAM pages. The PAM key is placed in front of the PAM page by the data chaining facility; it is not stored separately on tape. PTAM is the only driver available for tape files.

The specified BUFFER-LENGTH determines how many PAM pages make up a standard block. When the SAM access method is used, a standard block is not always completely filled by logical blocks. The area between the end of the last logical record and the end of the block will have undefined contents (see “remainder bytes” in the example below). Chained I/O is not possible for tape files.

Example

BUFFER-LENGTH=*STD(SIZE=2), RECORD-FORMAT=*VARIABLE

Nonstandard block formats

A nonstandard block is a data block on magnetic tape that is not preceded by a PAM key. Nonstandard blocks must never be longer than specified in the BUFFER-LENGTH operand in the ADD-FILE-LINK command (maximum length: 32768 bytes). Nonstandard blocks are generated whenever BLOCK-CONTROL-INFO=*WITHIN-DATA-BLOCK or *NO is specified, even with BUFFER-LENGTH=*STD(SIZE=n). In the case of UPAM processing, the BUFFER-LENGTH value must be a multiple of 2048.

Data block with management information (BLOCK-CONTROL-INFO=*WITHIN-DATA-BLOCK)

This block is not preceded by a PAM key. Instead, SAM and UPAM place a 12-byte block control field (CF) at the start of each logical block, to which SAM adds a 4-byte data length field (DL). These 12 (CF for UPAM) or 16 (CF plus DL for SAM) bytes are handled as a buffer offset.

Example

BLOCK-CONTROL-INFO=*WITHIN-DATA-BLOCK,BUFFER-LENGTH=*STD(SIZE=2),
RECORD-FORMAT=*VARIABLE, ACCESS-METHOD=*SAM

Data block without management information (BLOCK-CONTROL-INFO=*NO)

This block contains no block-specific management information. This format is only available for UPAM and SAM files.

Example

BLOCK-CONTROL-INFO=*NO,BUFFER-LENGTH=4096,RECORD-FORMAT=*VARIABLE,
ACCESS-METHOD=*SAM, Datenlänge 3900 Byte

Only the data is written to tape (in this example, 3900 bytes).

The data blocks within a file may have different lengths. However, no block may exceed the maximum block length specified in the BUFFER-LENGTH operand of the ADD-FILE-LINK command.

The following point applies to SAM files:

The data length field (DL) is not part of the record as defined in the DIN standard. For format V (RECORD-FORMAT=*VARIABLE) records, there is thus a buffer offset (BLOCK-
OFFSET) of 4 bytes. If the user specifies the operand BLOCK-OFFSET=0 in the ADD-FILE-LINK command, no buffer offset is executed, i.e. the block length field is ignored.

The extension of blocks by means of filler characters is supported by the SAM access method and by the label handling routines when reading (e.g. when reading non-BS2000 tapes).

Structure of the block and record length fields (for SAM files only):

in EBCDIC code:   

2-byte binary number (the block or record length), followed by two blanks (2X'40')

in ISO code:

a four-digit decimal number (corrsponds to format D)

As the decimal number in format D cannot exceed 9999, the maximum block length is 9999 Byte.

This block format is the block format for data exchange in accordance with DIN 66029 and will remain upwards and downwards compatible.

Example: SAM file with variable-length records and nonstandard blocks

The block (block length = 198 bytes) contains 3 records with lengths of 76, 84 and 34 bytes. The block and record length fields (BL and RL) contain the following:

                    

BL

SL-1

SL-2

SL-3

EBCDIC code (format V)

00C64040

004C4040

00544040

00224040

ISO code (format D)

F0F1F9F8

F0F0F7F6

F0F0F8F4

F0F0F3F4

Access methods and block format for tape files

The block format (standard or nonstandard blocks) is determined by the BLOCK-CONTROL-INFO, BUFFER-LENGTH or LABEL-TYPE operand (block length or tapestandard type) and by the access method. The following table shows which values may be specified for BLOCK-CONTROL-INFO, depending on the access method:

BLOCK-CONTROL-INFO

UPAM

SAM

BTAM

*PAMKEY

+

+


*WITHIN-DATA-BLOCK

+

+


*NO

+

+

+

Table 40: Tape files: block format and access methods

As shown in the table above, BTAM can only process files with nonstandard blocks (BLOCK-CONTROL-INFO=*NO). When working with SAM or UPAM, files with any block format (standard and nonstandard blocks) (BLOCK-CONTROL-INFO=*PAMKEY/ *WITHIN-DATA-BLOCK/*NO) can be processed.

A file cannot contain standard and nonstandard blocks at the same time.