New disk formats, particularly the non-key (NK) format, have been introduced to increase the storage capacity and the data transfer rate of disk storage. A non-key (NK) disk is formatted without PAM key. In order to be able to use the NK disk, K files must be converted to NK files (PAM key elimination).
BS2000 only supports disks with fixed block size (2 Kbytes, 4 Kbytes, etc.). These fixed block sizes are not readily compatible with PAM keys. For this reason the PAM keys have been done away with.
There are two different file formats on disk for SAM, ISAM and UPAM files; the previous format tied to the PAM key (K format) and the non-key format (NK2 and NK4 formats).
The file format is defined by the BLKCTRL value. BLKCTRL can assume the value PAMKEY, DATA, DATA2K, DATA4K or NO. For details on the file formats, please refer to the “Introductory Guide to DMS” [4 (Related publications)].
Library files
The distinction between K and NK format derives primarily from DMS. This distinction is reflected in the following ways in the internal file organization of the library:
The PAM key is not required. With regard to files, however, there is difference which is represented by the BLKCTRL file attribute.
Libraries need not be converted with PAMCONV when migrating between the K and the NK environments.
Member processing
The following diagram provides an overview of the situations which may arise when transferring data between the file and library members. For members, logical information units are listed; for files, the BLKCTR value is given. The arrows indicate the transfer direction.
Use of the ADD-ELEMENT statement
The ADD-ELEMENT statement is used to store file contents in members. Note the following details:
SAM/ISAM files
When SAM and ISAM files are added, the BLKCTRL value is also stored if SOURCE-ATTRIBUTES=*KEEP has been set, i.e. the original file block structure determined by the BLKCTRL value is documented in the attribute record.
The individual records are read using the SAM/ISAM logical access method and written unchanged to the member as variable-format records.
The member structure generated is independent of the original BLKCTRL attribute.
PAM files
When PAM files are added, the BLKCTRL value, too, is always stored. The blocks of the file are read using the UPAM access method and stored unchanged as a block in the member. If PAM keys are specified, i.e. BLKCTRL=PAMKEY, these PAM keys are stored in the member.
The generated member thus retains the block structure determined by the BLKCTRL value.
phases
When phases are added, the BLKCTRL value is not stored. The corresponding format specification is stored on file in the phase information. In the library, K phases and NK phases have the same format. The PAM key information is stored in descriptors.
ADD file > member | File type | BLKCTRL entry | PAMKEY storage |
---|---|---|---|
File resides on NK disk | SAM/ISAM | --1) | |
SAM/ISAM | from the catalog | no | |
UPAM | from the catalog | no | |
File resides on K disk | SAM/ISAM | --1) | no |
SAM/ISAM | from the catalog | no | |
UPAM | from the catalog | for BLKCTRL=PAMKEY |
Use of the EXTRACT-ELEMENT statement
The EXTRACT-ELEMENT statement is used to output the contents of members to files. The BLKCTRL value is determined in accordance with the following hierarchy:
The specification in the catalog entry or /ADD-FILE-LINK.
BLKCTRL value stored for the member. This is relevant only for files which were original PAM files.
Settings of the system parameter BLKCTRL= PAMKEY or NONKEY. This can be displayed by means of /SHOW-SYSTEM-PARAMETERS.
Disk attribute PAMKEY or NONKEY.
If no catalog entry exists and the BLKCTRL value has not been stored, the system parameter and the disk attribute determine the BLKCTRL value:
If the system parameter has been set to PAMKEY, LMSCONV lets the system define the BLKCTRL value, i.e. BLKCTRL is not specified.
If the system parameter has been set to NONKEY, LMSCONV sets BLKCTRL=DATA for SAM and ISAM files, and BLKCTRL=NO for PAM files.
ISAM files
Variable-length member records are written using the ISAM logical access method. The BLKCTRL value of the file is determined according to the algorithm described above; in this case, however, point 2 of the hierarchy above does not apply, as the BLKCTRL value stored for the member is used for documentation purposes only and is ignored.
SAM files
If BLKCTRL=DATA is specified, a DMS error occurs if records in the member are longer than 32 Kbytes - 16 bytes. In the K environment, these records may have a length of up to 32 Kbytes - 4 bytes. When selecting records, LMSCONV passes those which are too long to DMS without checking them. The BLKCTRL value is determined in the same way as for ISAM.
PAM files
In the NK environment, the PAM keys are lost. In addition, when BLKCTRL=DATA is specified, the first 12 bytes of each logical block are overwritten by the system. In both cases LMSCONV issues a warning.
Phases (C-type members)
Phases (C-type members) are handled in a special way. In addition to the old phase format (K phase), there is a new “PAM-key-free” phase format (NK phase) for files.
Summary
SAM/ISAM files
It is always possible to add and select files. Any BLKCTRL values stored are used for documentation purposes only.
The internal file format is always determined by the SAM/ISAM access method. This method also converts records to the internal block format of the file.
UPAM files
Neither the UPAM access method nor LMSCONV can be used for the automatic conversion of data, since this would result in data being lost.
Control rests ultimately with the user.
File type
UPAMCreated / stored BLKCTRL entry
in the attribute recordPAMKEY
DATA
NO
--
File resides on NK disk
1)
2)
ADD
EXTRACTADD
EXTRACT---
EXTRACTFile resides on K disk
ADD
EXTRACTADD
EXTRACTADD
EXTRACT---
EXTRACT