Here it is necessary to distinguish between members with or without an attribute record:
Member with attribute record
The member has an attribute record with the original BUFFER-LENGTH specification. This occurs if the operand SOURCE-ATTRIBUTES=*KEEP in the ADD-ELEMENT statement was specified or if the member was an original UPAM file, e.g. a PLAM library.
For the output of these members, the following points should be borne in mind:
A BUFFER-LENGTH value is explicitly preset for the target file, either through an entry in the task file table (TFT) via the ADD-FILE-LINK command, or directly in the catalog entry. In this case, the preset value is always used. When the value is transferred, the following problems may occur:
SAM/ISAM file:
The member records are too long for the preset BUFFER-LENGTH. A DMS error is then output.UPAM file:
When creating UPAM files, LMS fills up a logical block (except for the last one) with 2K units and only then outputs it with UPAM .
When BLOCK-CONTROL-INFORMATION=WITHIN-DATA-BLOCK, every logical block (BUFFER-LENGTH) begins with a 12-btye block control field (CF). If the preset BUFFER-LENGTH does not correspond to the stored value, data can be overwritten with the CF by the BS2000 Data Management System (DMS). The file is then unusable.
When BLOCK-CONTROL-INFORMATION=NO, however, unusable information may likewise be generated if the BUFFER-LENGTH is changed (e.g. PLAM files).
In order to avoid these situations, LMS issues a warning if the specified BUFFER-LENGTH differs from the stored entry. However, LMS always attempts to generate the file.
A BUFFER-LENGTH value is not explicitly preset or known for the target file. In this case, the value from the attribute record is used.
If the value n in STD(SIZE=n) is odd, LMS increments it to (n+1).
Member without an attribute record
When working with members which have not attribute record, bear in mind the following:
If a BUFFER-LENGTH value is explicitly preset for the target file, LMS treats these members as members with an attribute record (see above).
When phases are being created, BUFFER-LENGTH specifications other than STD(SIZE=1) or STD(SIZE=2) lead to errors.
If a BUFFER-LENGTH value for the target file is not explicitly preset or known, LMS determines it as follows:
The BUFFER-LENGTH for phases is obtained from the current environment, i.e. BUFFER-LENGTH=STD(SIZE=1) for NK2 disks and STD(SIZE=2) for NK4 disks. The phases do not differ in terms of content.
Otherwise, the BUFFER-LENGTH is calculated from the maximum record length.
Recommendations for converting files from K/NK2 to NK4 disks
When converting files from an K/NK2 disk to an NK4 disk via a library, bear in mind the following recommendations:
“Actions” on the NK2 disk:
Extract all “critical” members of the library as files. Critical members are “PAM” members under type X, which, as a file, have one of the following characteristics:
BUFFER-LENGTH = STD(SIZE=n), where n is odd
PAM key phases
2K-oriented PLAM files
Using PAMCONV, convert all files with an odd BUFFER-LENGTH (except PLAM files) into NK4 files.
Using LMSCONV via type C, convert all PAM key phases to NK4 phases. The conversion only works if it is carried out on a K disk.
Using the LMS statement COPY-LIBRARY, convert NK2 PLAM files into NK4 PLAM files.
Using the LMS statement ADD-ELEMENT, add the NK4 files to an NK4 PLAM file and transfer that file to the NK4 disk.
Notes
An NK4 library on a key disk can, for example, be converted to an NK4 disk via the BS2000 command COPY-FILE (see [4 (Related publications)]) or by means of the BS2000 products FILE-TRANSFER (see [14 (Related publications)]) and ARCHIVE (see [2 (Related publications)]). The relevant operands for handling the BLOCK-CONTROL values can be found in the respective manuals.
An NK2 PLAM file under type X cannot be converted into the NK4 PLAM format using EXTRACT-ELEMENT.