Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

CONVERT-FILE - Convert files

&pagelevel(5)&pagelevel

This statement serves to convert files from a format in which the PAM key is used for data representation into a format in which the PAM key is not used, or vice versa.

The CONVERT-FILE statement is also used for reblocking (see the section “Reblocking”).

The CONVERT-FILE statement offers three options:

  • Conversion: changes the file format, i.e. converts a file from K format to NK format or vice versa.

  • Reblocking: changes the logical block size. No change to the file format.

  • Conversion and reblocking

The default values for the CONVERT-FILE statement are set using the MODIFY-CONVERT-FILE-DEFAULTS statement.

The default values indicated by underscoring take effect only if no other values have been specified.

 

Format

CONVERT-FILE                                                                                                                                             

DIRECTION = *TO-NONKEY / *NONKEY-TO-KEY

,FROM-FILE = <filename 1..54> / *LINK(...) / <partial-filename 2..53 with-wild(79)> / *ALL


*LINK(...)



|

LINK-NAME = <filename 1..8 without-gen>

,SELECT = *ALL / *BY-ATTRIBUTES(...)


BY-ATTRIBUTES(...)



|

CREATION-DATE = *ANY / <date> / *TODAY / *YESTERDAY / *INTERVAL(...)



|


*INTERVAL(...)



|



|

FROM = 0000-01-01 / <date> / *YESTERDAY



|



|

,TO = *TODAY / <date> / *YESTERDAY



|

,LAST-ACCESS-DATE = *ANY / <date> / *TODAY / *YESTERDAY / *INTERVAL(...)



|


*INTERVAL(...)



|



|

FROM = 0000-01-01 / <date> / *YESTERDAY



|



|

,TO = *TODAY / <date> / *YESTERDAY



|

,SIZE = *ANY / <integer 0..16777215> / *INTERVAL(...)



|


*INTERVAL(...)



|



|

FROM = 0 / <integer 0..16777215>



|



|

,TO = 16777215 / <integer 0..16777215>



|

,FILE-STRUCTURE = *ANY / list-poss(3): *SAM / *ISAM / *PAM



|

,BLKSIZE = *ANY / <integer 1..16>



|

,BLKCTRL = *ANY / *PAMKEY / *NO / *DATA / *DATA2K / *DATA4K

 

,TO-FILE = <filename 1..54> / *LINK(...) / <partial-filename 2..53 with-wild(79)>


*LINK(...)



|

LINK-NAME = <filename 1..8 without-gen>

,TO-FILE-BLKSIZE = *STD / *NK4 / <integer 1..16>

,TO-FILE-BLKCTRL = *STD / *NK4

,REPLACE-OLD-FILES = *NO / *YES / *DIALOG

,FILE-DISPOSAL = *KEEP / *REPLACE / *INPLACE / *RENAME

,PROTECTION = *STD / *SAME

,DEVICE-FOR-TEMPFILE = *NONE / *TAPE(...) / *DISK(...)


*TAPE(...)



|

VOLUME = list-poss(100): <alphanum-name 1..6>



|

,DEVICE-TYPE = <device>


*DISK(...)



|

VOLUME = list-poss(100): <alphanum-name 1..6>



|

,DEVICE-TYPE = <device>

Operands

DIRECTION = *TO-NONKEY / *NONKEY-TO-KEY
Designates the direction in which file conversion is to take place.

DIRECTION = *TO-NONKEY
This file is to be converted into NK format. The source file may be in K format or NK format.

DIRECTION = *NONKEY-TO-KEY
This file is to be converted from NK to K format.

FROM-FILE = <filename 1..54> / *LINK(...) / <partial-filename 2..53 with-wild(79)> / *ALL
Identifies the files to be converted.

FROM-FILE = <filename 1..54>
Designates the file to be converted. Specification of a file generation is possible.

FROM-FILE = *LINK(...)
The file to be converted was specified by a previous /ADD-FILE-LINK; the link name given there must be identical to the one specified here.

LINK-NAME = <filename 1..8 without-gen>
Specifies the link name.

FROM-FILE = <partial-filename 2..53 with-wild(79)>
Means that all files corresponding to the specified wildcard syntax and to any additional selection criteria are to be converted.

FROM-FILE = *ALL
Means that all files corresponding to the specified selection criteria are to be converted.

SELECT = *ALL / *BY-ATTRIBUTES(...)
Defines whether the files to be converted are to be selected via specific criteria in addition to the partially qualified file name.

SELECT = *ALL
No additional selection criteria are specified for the source files.

SELECT = *BY-ATTRIBUTES(...)
Defines the selection criteria for the files to be converted.

CREATION-DATE = *ANY / *INTERVAL(...) / <date> / *TODAY / *YESTERDAY
Designates the creation date as a selection criterion.

CREATION-DATE = *ANY
The creation date is not used as a selection criterion. All files are taken into account for selection.

CREATION-DATE = INTERVAL(...)
Files with a creation date within the specified interval are selected. The range limits are defined by the FROM and TO operands.

FROM = 0000-01-01 / *YESTERDAY / <date>
Files with a creation date equal to or later than the specified limit are selected.

FROM = 0000-01-01
The lower limit is the earliest possible date.

FROM = *YESTERDAY
The lower limit is yesterday’s date. Files with a creation date ≥ yesterday’s date are selected.

FROM = <date>
The lower limit is the specified date. Files with a creation date ≥ the specified value are selected.

TO = TODAY / *YESTERDAY / <date>
Files with a creation date equal to or earlier than the specified limit are selected.

TO = *TODAY
The upper limit is the current date. Files with a creation date ≤ the current date are selected.

TO = *YESTERDAY
The upper limit is yesterday’s date. Files with a creation date ≤ yesterday’s date are selected.

TO = <date>
The upper limit is the specified date. Files with a creation date ≤ the specified value are selected.

LAST-ACCESS-DATE = *ANY / *INTERVAL(...) / <date> / *TODAY / *YESTERDAY
Designates the date of the last file access as a selection criterion.

For the meaning of ANY, INTERVAL(...), <date>, TODAY and YESTERDAY see the CREATION-DATE operand.

SIZE = *ANY / <integer 0..16777215> / *INTERVAL(...)
Designates the file size as a selection criterion.

SIZE = *ANY
The file size is not used as a selection criterion.

SIZE = <integer 0..16777215>
Files with a size equal to the specified value are selected.

SIZE = *INTERVAL(...)
Files with a size within the specified range are selected. The range limits are defined by the FROM and TO operands.

FROM = 0 / <integer 0..16777215>
Files with a size ≥ the specified limit are selected.

FROM = 0
The lower limit is the absolute minimum.

FROM = <integer 0..16777215>
The lower limit is the specified size.

TO = 16777215 / <integer 0..16777215>
Files with a size ≤ the specified limit are selected.

TO = 16777215
The upper limit is the absolute maximum.

TO = <integer 0..16777215>
The upper limit is the specified size.

FILE-STRUCTURE = *ANY / list-poss(3): *SAM / *ISAM / *PAM
Designates the access method as a selection criterion.

FILE-STRUCTURE = *ANY
The access method is not used as a selection criterion.

FILE-STRUCTURE = *SAM
Files with the SAM access method are selected.

FILE-STRUCTURE = *ISAM
Files with the ISAM access method are selected.

FILE-STRUCTURE = *PAM
Files with the PAM access method are selected.

BLKSIZE = *ANY / <integer 1..16>
Designates the block size as a selection criterion.

BLKSIZE = *ANY
The block size is not used as a selection criterion.

BLKSIZE = <integer 1..16>
Files with a block size equal to the specified value are selected.

BLKCTRL = *ANY / *PAMKEY / *NO / *DATA / *DATA2K / *DATA4K
Designates the block control attribute as a selection criterion.

BLKCTRL = *ANY
The block control attribute is not used as a selection criterion.

BLKCTRL = *PAMKEY
Files with the block control attribute PAMKEY are selected.

BLKCTRL = *NO
Files with the block control attribute NO are selected.

BLKCTRL = *DATA
Files with the block control attribute DATA are selected.

BLKCTRL = *DATA2K
Files with the block control attribute DATA2K are selected.

BLKCTRL = *DATA4K
Files with the block control attribute DATA4K are selected.

TO-FILE = <filename 1..54> / *LINK(...) / <partial-filename 2..53 with-wild(79)>
Identifies the files to be created by conversion.

TO-FILE = <filename 1..54>
Designates the file to be created by conversion. Specification of a file generation is possible.

TO-FILE = *LINK(...)
The file to be created was specified by a previous /ADD-FILE-LINK; the link name given there must be identical to the one specified here.

LINK-NAME = <filename 1..8 without-gen>
Specifies the link name.

TO-FILE = <partial-filename 2..53 with-wild(79)>
Specifies the files to be created by conversion in the form of a partial qualification with wildcard syntax.

TO-FILE-BLKSIZE = *STD / *NK4 / <integer 1..16>
Specifies the logical block size of the target file.

TO-FILE-BLKSIZE = *STD
The logical block size of the target file is not defined by the user. PAMCONV uses the values defined for the target pubset and, if necessary, increases the blocking factor. The blocking factor is increased internally by a maximum of 1.

TO-FILE-BLKSIZE = *NK4
The logical block size of the target file is controlled in such a way that it is always even, i.e. the target file can be stored on an NK4 pubset. The blocking factor is increased internally by a maximum of 1.

TO-FILE-BLKSIZE = <integer 1..16>
The target file is generated with a block size equal to the specified value, provided that this specification is compatible with the other conditions governing reblocking (see the section “Reblocking”).

TO-FILE-BLKCTRL = *STD / *NK4
Specifies the block control information of the target file. This operand is relevant only for the conversion direction TO-NONKEY and for ISAM files.

TO-FILE-BLKCTRL = *STD
The block control information is set in accordance with the target pubset. With NK2 pubsets, the data format is DATA2K; with NK4 pubsets, it is DATA4K.

TO-FILE-BLKCTRL = *NK4
The block control information is assigned the value DATA4K.

REPLACE-OLD-FILES = *NO / *YES / *DIALOG
Indicates whether any files existing under this name are to be overwritten.

REPLACE-OLD-FILES = *NO
Existing files must not be overwritten; file conversion is aborted in this case.

REPLACE-OLD-FILES = *YES
Existing files are overwritten unless additional protection (password, ACCESS=*READ,..) has been provided.

REPLACE-OLD-FILES = *DIALOG
The system issues a query as to the desired procedure for existing files with the same name. Possible in interactive mode only.

FILE-DISPOSAL = *KEEP / *RENAME / *REPLACE / *INPLACE
Determines what happens to the source and target files after conversion.

FILE-DISPOSAL = *KEEP

The target files are to be created with the names specified for them in the conversion statement. The target files exist in addition to the source files.

FILE-DISPOSAL = *RENAME
The target files are to be created with the names specified for them in the conversion statement. After successful conversion, the source files are to be deleted.

FILE-DISPOSAL = *REPLACE
The target files are to be created with the names specified for them in the conversion statement. After successful conversion, the source files are to be deleted and the target files are to receive the names of the source files. In effect, the source file is replaced by the target file.

FILE-DISPOSAL = *INPLACE
The target files are to be created with the names specified for them in the conversion statement. After successful conversion, an attempt is to be made to overwrite the source file with the target file and to assign the source file name to the target file. This has the effect that the target file also physically takes up approximately the same space as the source file. In effect, the source file is replaced by the target file.

PROTECTION = *STD / *SAME
Specifies whether the file protection attributes of the source file are to be transferred to the target file.

PROTECTION = *STD
The file protection attributes are not transferred.

PROTECTION = *SAME
The file protection attributes are transferred to the target file. For more details see “Transfer of file protection attributes after conversion” (Special points relating to conversion).

DEVICE-FOR-TEMPFILE = *NONE / *TAPE(...) / *DISK(...)
Designates the storage medium which is to accommodate the intermediate (temporary) file created.

DEVICE-FOR-TEMPFILE = *NONE
No intermediate file is to be stored on a private volume.

DEVICE-FOR-TEMPFILE = *TAPE(...)
The intermediate file is to be stored on magnetic tape.

VOLUME = list-poss(100): <alphanum-name 1..6>
Designates the VSN(s) of the tape(s) to be used as storage medium, if more than one VSN are stated in a list.

DEVICE-TYPE = <device>
Designates the tape device type to be used.

DEVICE-FOR-TEMPFILE = *DISK(...)
The intermediate file is to be stored on private disk.

VOLUME = list-poss(100): <alphanum-name 1..6>
Designates the VSN(s) of the private disk(s) to be used as storage medium, if more than one VSN are stated in a list.

DEVICE-TYPE = <device>
Designates the disk device type to be used.