Special points relating to the conversion of ISAM files
The TO-FILE-BLKCTRL operand of the CONVERT-FILE or MODIFY-CONVERT-FILE-DEFAULTS statement can be used to define the file format for ISAM files if the conversion direction TO-NONKEY is selected.
This particular case is subject to certain restrictions with regard to compatibility between the logical block size (TO-FILE-BLKSIZE) and the file format (TO-FILE-BLKCTRL) of an ISAM target file.
The assignment TO-FILE-BLKCTRL=*STD means that the block control information is set according to the target pubset. With NK2 pubsets, the file format is DATA2K; with NK4 pubsets, it is DATA4K.
If TO-FILE-BLKCTRL=*NK4 is specified, the block control information is assigned the value DATA4K.
TO-FILE-BLKSIZE defines the logical block size of the target file:
TO-FILE-BLKSIZE=*STD:
the logical block size is set according to the target pubset.TO-FILE-BLKSIZE=*NK4:
the logical block size is always even.TO-FILE-BLKSIZE=<integer 1..16>:
the target file is generated with a logical block size equal to the value specified here.
The following table shows the compatibility between the logical block size TO-FILE-BLKSIZE and the file format TO-FILE-BLKCTRL of an ISAM target file.
TO-FILE-BLKSIZE | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TO-FILE- | STD | NK4 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
STD | X 1) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
NK4 | X | X | X | X | X | X | X | X | X |
Special points relating to the conversion of PAM files (not load modules)
In order to ascertain whether a PAM file with a PAM key actually uses this key, the user part of the PAM key is checked.
If the user part contains 8 X'00' bytes in each PAM block, the file is considered to be convertible.
Conversion to NK format consists in dropping the PAM key information (which is not in use); the BLKCTRL indicator field (see “Defining block control information during conversion” below) is assigned the value NO.
If the user part does not contain X'00', the file is assumed to use the PAM key. Such a file is classified as inconvertible, and conversion is aborted.
PAM files whose PAM key user part contains X'01' or X'80' in byte 1 but otherwise zero are an exception. With such files it is assumed that the PAM key is not used but that the user part was erroneously supplied with the above-mentioned values as a result of a DMS error. Such files are therefore classified as convertible to NONKEY format. A message pointing out this exception is displayed during conversion.
If a K-PAM file contains gaps, these are replaced by “zero blocks” (2048 X'00' bytes) in the NK-PAM file during conversion.
Conversion of file generations
The file generations making up a file generation group can be converted by issuing a separate CONVERT-FILE statement for each file generation.
Fully automatic conversion of a file generation group with all its file generations in one pass is not possible; any such attempt is rejected with an error message.
Defining block control information during conversion
When converting from K to NK format, the block control information is set for the target file, depending on the relevant access method:
If the file name is specified by means of a link name and the BLKCTRL parameter is used, the BLKCTRL specification must be correct.
Converting an NK file into NK format
For compatibility reasons, the conversion of a file into NK format when the source file is already in NK format continues to be supported. But the function only copies the source file to the target file.
Transfer of file protection attributes after conversion
Following successful conversion, the file protection attributes of a source file can be transferred to the target file. To do this, the PROTECTION operand must be specified with the *SAME value in the CONVERT-FILE statement. If the user does not specify this value, the target file will be created without the file protection and file security features of the source file.
File protection attributes are transferred in accordance with the specification PROTECTION=*SAME in /COPY-FILE
(see the “Commands” manual [1 (Related publications)]).
In order to be able to convert a protected file, before the PAMCONV run the user must specify all access authorizations (e.g. issuing of passwords) with the corresponding commands. The conversion algorithm itself is then executed in the usual way, without change. At the end of a successful conversion procedure, the protection attributes of the source file are transferred to the target file.
Transfer of file protection attributes according to user ID
The list below is based on direct conversion (without intermediate medium) from disk to disk.
Conversion within any user ID
The following protection attributes are transferred:
Protection attribute
Description
ACCESS
Standard access control; specifies whether write access (implicit read access) is permitted for the file, or read access only.
BACKUP-CLASS
specifies the frequency of automatic file saving with the ARCHIVE or HSMS backup system.
NUM-OF-BACKUP-VERS
specifies whether the file is part of the version backup and, if yes, also the maximum number of file versions to be saved in the version backup archive.
BASIC-ACL
Basic access control list; access control for the file is implemented via a BASIC-ACL entry. The read, write and execute access rights can be distributed among various user groups.
DESTROY-BY-DELETE
Files that are no longer required are overwritten with X'00'. This increases data protection.
ENCRYPTION
Password encryption
GUARDS
Access control via GUARDS; GUARDS is a functional unit of the SECOS software product.
LARGE
Extent of automatic file saving with the ARCHIVE or HSMS backup system.
MIGRATE
Files are migrated to another storage level if they have not been accessed for a certain length of time.
OPNBACK
specifies whether database files can also be saved with ARCHIVE even when they are open.
RETENTION-PERIOD
defines a protective deadline up until which only read access to the file is allowed, i.e. it must not be modified or deleted.
USER-ACCESS
controls access to the file via other user IDs.
Passwords cannot be transferred as part of conversion within any user ID. This is only possible during conversion under the system administration ID (TSOS).
Conversion under the system support ID (TSOS)
Read (READ-PASSWORD), write (WRITE-PASSWORD) and execute passwords (EXEC-PASSWORD) are transferred, as are all protection attributes described above.
Conversion of a source file from another user ID to the user’s own ID
The file saving attributes LARGE, BACKUP, NUM-OF-BACKUP-VERS, MIGRATE and OPNBACK and the file security attributes DESTROY-BY-DELETE, RETENTION-PERIOD, READ-PASSWORD, WRITE-PASSWORD, EXEC-PASSWORD and ENCRYPTION are transferred.
BASIC-ACL or GUARDS entries in the source file are not transferred to the target file. These entries are assigned default values in the target file, as is the file protection attribute ACCESS. If an existing target file already has protection entries, they will be reset before the source file entries are transferred.Conversion of a source file from the user’s own ID to another user ID
The protection attributes of the source file are not transferred to the target file, even if the user is authorized to create the target file.
Restrictions applying to the transfer of file protection attributes when converting via an intermediate medium
The transfer of file protection attributes is only supported within “one-step conversion using an intermediate file”.
The file protection attributes are not transferred in the event of “two-step conversion using an intermediate file”. If PROTECTION=*SAME is specified in the CONVERT-FILE statement, it is ignored.One-step conversion using an intermediate medium
The protection attributes of the source file are transferred because neither the PAMCONV run nor the current conversion statement CONVERT-FILE are interrupted. The following processing steps are executed:
conversion from a public disk to an intermediate medium
release of the source file’s storage space
internal transfer from the intermediate medium to the public disk
setting of protection attributes
deletion of the source file
Two-step conversion using an intermediate medium
With this method of conversion both the PAMCONV run and the conversion statement may be interrupted. The file protection attributes cannot be transferred when the intermediate file is output on magnetic tape or disk, for the following reasons:
The second conversion step (from magnetic tape or private disk to the target file) could take place at an arbitrary later time, on an arbitrary system. This may result in incompatibilities, because the transfer of the NK file from the intermediate medium to a public data medium does not have to be executed with PAMCONV. Other transfer routines do not receive any information about the transfer of file protection attributes.
The user label of the magnetic tape on which the intermediate file is to be stored must be retained, for compatibility reasons; since further file characteristics cannot be included due to lack of space, it is impossible to transfer the protection attributes.
Procedure with the target file after conversion
The procedure with the target file after conversion is governed by the FILE-DISPOSAL operand in the CONVERT-FILE statement. The file protection attributes are transferred as shown below when the following operand values are specified:
FILE-DISPOSAL =
Meaning for transfer of file protection attributes
KEEP
Default setting. Source and target files are retained. The file protection attributes are transferred without problems.
RENAME
The source file is deleted after conversion. The protection attributes are transferred before deletion. If an error occurs during transfer, the source file is not deleted and the process is aborted with an error. The file protection attributes are therefore retained.
REPLACE
The source file is deleted after conversion and the target file is recataloged in accordance with the source file. The protection attributes are transferred before deletion. If an error occurs during transfer, the source file is not deleted and the process is aborted with an error. The file protection attributes are therefore retained.
INPLACE
After conversion, the source file is overwritten with the target file. The file protection attributes are transferred.