Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

SAM block structure in BS2000

In BS2000, SAM files are processed sequentially by using the record-oriented SAM access method. Regarding Net-Storage and node files, only SAM processing on disk is relevant, meaning that special aspects of tape processing do not play a role in this context. Only NK-SAM files in the format BLKCTRL=DATA and with variable-length records (RECFORM=V) are supported as SAM node files on Net-Storage.

For NK-SAM files with these file attributes, the SAM access method creates data blocks with the following structure:

  • The logical block, which consists of n PAM pages (or logical halfpages LHP, (STD,n) with n = 1..16), starts with a 12-byte BLKCTRL field and a 4-byte data length field. The data length field specifies the length of the user data in the logical block.
  • These are followed by the SAM records, each consisting of a record length field and data. The data between the user data and the end of the logical block are undefined. During the sequential writing of the file, the logical blocks are filled record by record (PUT macro), until the next record in the sequence cannot be fitted into the current block anymore. This record is then written into the next logical block.

  • However, an application may also “close” the data block before it is completely full and start a new data block (RELSE macro).

The SAM access method, when reading these NK-SAM files, expects the data blocks to follow this structure. For reading the data blocks the following applies:

  • Sequential reading is done via GET. Closing the current block and reading the next block is done via RELSE followed by GET.

  • Within the file, SETL can be used to position to a specific block and record.

For details on the access method, see chapter "SAM - Sequential Access Method" (SAM - Sequential Access Method).