Copy files
Component: | BS2000 |
Functional area: | File processing |
Domain: | FILE |
Privileges: | TSOS |
Routing code: | $ (with NBCONOPI=N) or E (with NBCONOPI=Y) |
Function
The COPY-FILE command copies files, file generations or file generation groups one block at a time, without changing them. The command can therefore not be used to modify file attributes. For example, a SAM file cannot be converted to an ISAM file, nor can fixed-length records be changed to variable-length ones.
It is, however, possible to change the BLOCK-CONTROL-INFO file attribute (see the BLOCK-CONTROL-INFO operand).
Tape files with BLOCK-CONTROL-INFO=*PAMKEY must, therefore, have the default block format so that they can be processed using COPY-FILE.
If the target file (copy) is not yet cataloged, it is automatically created on a public volume when the COPY-FILE command is executed (as with a CREATE-FILE command with default values for the specified target file).
If the target file is to be stored on a different volume (Net-Storage volume, private disk or tape), it must be created using the CREATE-FILE command (DEVICE-TYPE, VOLUME operands) before the COPY-FILE command is issued.
If the target file is a SAM node file, the net coded character set can be assigned in the CREATE-FILE command. This is the character set used to store the data of the node file on Net-Storage. When the SAM file is then copied from public space to Net-Storage, the net coded character set of the target file is retained.
If a SAM node file is copied into a SAM node file, the net coded character set of the source file is adopted for the target file as well. If a SAM node file is copied to public space, the net coded character set is not adopted for the SAM file on public space.
The COPY-FILE command uses the internal file link names DMCOPY11 (FROM-FILE) and DMCOPY22 (TO-FILE). Both of these two link names are released again after processing, even if the user explicitly specified them.
Thus, if wildcards are used in the file name, any existing TFT entry is applicable only during copying of the first file to be processed.
If the target file is a disk file which has not yet been cataloged, the primary and secondary allocations are taken from the original disk file (see also the CREATE-FILE command, PRIMARY-ALLOCATION operand). If the original file is on tape, the target disk file will be given a default allocation.
The COPY-FILE command will be rejected if the target file is a read-only file
(ACCESS=READ or no write authorization when access is controlled using BASIC-ACL or GUARDS), if a password has been specified to protect it against unauthorized write access, if a retention period (EXPIR-DATE > today’s date) has been specified for it, or if the secondary allocation for the output file has a null value and the primary allocation is insufficient.
The user may specify whether the protection attributes of the original file are to be transferred to the target file (PROTECTION operand).
Privileged functions
A user working with the TSOS privilege can select the IGNORE-PROTECTION operand to explicitly circumvent any file protection on the source and target files which would prevent copying of the file.
Verifying command execution
The user can verify command execution. Use of the verification mechanisms is particularly helpful when a set of files is specified (using a partially qualified file name or wildcards).
The REPLACE-OLD-FILES operand governs whether a verification check is carried out before an existing target file is overwritten.
The DIALOG-CONTROL operand governs whether a verification dialog is to be conducted with the user. The OUTPUT operand lets the user specify whether each file name that is processed is to be logged in a guaranteed message to SYSOUT. The processed file names can be viewed in the message stream (see the ASSIGN-STREAM command, STREAM-NAME=SYSMSG operand, or the EXECUTE-CMD command, MSG-STRUCTURE-OUTPUT operand, in the “SDF-P” manual [34]).
File generation groups
A file generation group can be copied into another file generation group only if one of the following conditions is fulfilled:
The group entries for the two file generation groups match each other (i.e. the values for MAXIMUM, FIRST-GEN, LAST-GEN and BASE-NUM in the catalog entry are the same). In the file generation group into which DMS is to write the copy, the generations from FIRST-GEN to LAST-GEN must already be cataloged.
The value for MAXIMUM is the same for both file generation groups, and the file generation group into which DMS is to write the copy contains no generations (i.e. the fields FIRST-GEN, LAST-GEN and BASE-NUM in the catalog entry have the value zero).
A file generation group which is to be copied may not contain any generations on tape.
A file generation group can only be copied into a single file or a file generation if it consists of SAM file generations which have the same attributes (e.g. same record and block lengths, same record format, same BLK-CONTR value). Furthermore, the target file generation must not be part of the file generation group which is to be copied.
Files held on private disks
If a file on a private disk has an entry in the system catalog, but no entry in the F1 label, the catalog entry is deleted when the file is copied. If this file is the input file, the command is rejected. If it is the target file, a new file is created in public space. Any COPY-FILE command for an ISAM file held on private disk with separate index and data areas will be rejected.
Tape files
K tape files. Tape files for which BLK-CONTR=PAMKEY must have the standard block format (catalog entry BUF-LEN=STD(n) if the COPY-FILE command is to be used on them).
NK tape files. Tape files for which BLK-CONTR=DATA/NO and for which the BUF-LEN value is a multiple of 2048 bytes can be copied.
External files on tape When NK files are copied to tape, the BLK-CONTR information is removed if the catalog entry is deleted. If a tape file is to be copied which is not cataloged, it must first be cataloged by an IMPORT-FILE command. If the file is an NK file (BLK-CONTR=DATA/NO), the user must supply the correct BLOCK-CONTROL-INFO operand in the ADD-FILE-LINK command, i.e. he must specify BLOCK-CONTROL-INFO=*NO/*WITHIN-DATA-BLOCK to correspond to the actual file format, and must specify LINK-NAME = DMCOPY11 and the ACCESS-METHOD operand.
If a K file (BLK-CONTR=PAMKEY) is inadvertently copied as an NK file (BLK-CONTR= DATA), the resulting disk file will be unreadable; this is because the first 16 bytes on each PAM page, which for BLK-CONTR=PAMKEY would hold data, will have been overwritten with
management information.
Internally, the COPY-FILE command uses the access method UPAM, which does not support the processing of continuation tapes. It is thus possible to copy several files to one tape. It is not possible, however, to copy files which extend across multiple tapes.
PLAM libraries
PLAM libraries can only be copied if the library does not contain any specially protected data (see the “LMS” manual [21]).
A PLAM library protected by BASIC-ACL or GUARDS in a remote system cannot be copied.
Remote file access (see the “RFA” manual [31])
Copying from one remote system to another, with the input and output on different systems, is supported by a higher-level execution routine. The local system acts, in this case, only as an intermediate station for data transfer.
A SET-RFA-CONNECTION command must be issued for both of the remote systems before copying is started.
When a remote file is copied to a local one with the operand PROTECTION=*SAME, the passwords will not be transferred.
If different versions of BS2000, the following basic rules apply:
The COPY-FILE should be issued on the system with the highest version.
The file should be converted appropriately, either before or afterwards, using the PAMCONV utility.
The specified operands must be supported by the operating system version of the remote system.
If a file is to be copied from one remote system to another and I/O on two different systems is involved, the operation is supported by the higher-ranking execution routine. The local system serves as an intermediate system for data transfer.
The SET-RFA-CONNECTION command must be issued for both remote systems before copying starts.
File encryption
Normally it is not necessary to enter the crypto password in the task’s crypto password table in order to copy encrypted files as the file content is transferred without being decrypted.
Decryption during copying is required for the following copying operations:
Encrypted files are copied to tape or private disk.
Shared update processing was defined in the TFT entry of the internal file link name DMCOPY11 or DMCOPY22 (see the ADD-FILE-LINK command).
Format
COPY-FILE | Alias: CPF |
FROM-FILE = <filename 1..54 with-wild(80)> ,TO-FILE = <filename 1..54 with-wild-constr(80)> ,PROTECTION = *STD / *SAME ,CHANGE-DATE = *STD / *SAME ,REPLACE-OLD-FILES = *YES / *NO / *BY-DIALOG ,BLOCK-CONTROL-INFO = *KEEP-ATTRIBUTE / *IGNORE-ATTRIBUTE / *CHECK-REMOVAL ,IGNORE-PROTECTION = *NO / list-poss(2): *SOURCE-FILE / *TARGET-FILE ,DIALOG-CONTROL = STD / *NO / *ERROR / *FILE-CHANGE / *MORE-THAN-ONE-FILE / *USER-ID-CHANGE / *CATALOG-CHANGE ,OUTPUT = *NO / *SYSOUT |
Operands
FROM-FILE = <filename 1..54 with-wild(80)>
Name of the file, file generation or file generation group which is to be copied (the original file). If the file name includes wildcards, or if the specification is partially qualified, the command is executed for the associated set of files. Processing can be controlled and verified with the aid of the DIALOG-CONTROL and OUTPUT operands. Only systems support is allowed to use wildcards within the user ID. If the original file (FROM-FILE) is not cataloged under the user ID for the job, the relevant user ID must be specified in the command, and the user ID under which the command is called must be authorized to access this file/file generation/FGG (USER-ACCESS= ALL-USERS, or read access rights using BASIC-ACL or GUARDS, or co-owner).
If the original file is a file generation group, the target file (TO-FILE) must also be an FGG (with the sole exception of an FGG (FROM-FILE) which consists of SAM file generations which all have the same attributes for record format, record and block length, and the block control information). In this case only, it is possible to copy into a single file or file generation. The target file generation may not be a constituent of the file generation group which is being copied.
TO-FILE = <filename 1..54 with-wild-constr(80)>
Name of the file, file generation or file generation group into which the copy is to be made (the target file). If a set of files has been specified in the FROM-FILE operand, a constructor string can be used to specify how the names of the target files are to be formed. The constructor string should be designed to ensure that the names of the target files are unique. If, for example, a fully qualified file name is specified as the target file for a set of files, the first source file will be copied to this file. For the following source files, the target file will already exist. Depending on the setting of the REPLACE-OLD-FILES operand, either every subsequent source file will likewise be copied to the target file, or copying will be rejected. When processing of the command is complete, the target file will hold the contents either of the first source file or of the last source file.
If the target file has not yet been cataloged, then only the user’s own ID (the one under which the SET-LOGON-PARAMETERS command was issued) or a user ID for which the user is co-owner may be specified. If a target file which has not yet been cataloged is to be stored on an SM pubset, the system attempts to locate it on a suitable volume set on the basis of the source file’s attributes (performance, availability). If the target file is already cataloged under another user’s ID, this user ID must be specified, and the user ID under which the command is called must be authorized to access this file (i.e. USER-ACCESS=ALL-USERS or the appropriate access rights using BASIC-ACL or GUARDS must have been assigned).
If the target file is a file generation group, then the original file must also be a file generation group.
If the file is to be copied to a private volume, then the target file must have been appropriately cataloged beforehand (CREATE-FILE).
The COPY-FILE command will be rejected in the following cases:
if the target file may only be read; i.e. if ACCESS=READ is defined or if write access is prohibited using BASIC-ACL or GUARDS;
if there is still a retention period applicable to the file (EXPIR-DATE > current date);
if the target file is password-protected against unauthorized write access;
if the primary allocation for a target file on disk is insufficient and the secondary allocation is defined as 0.
PROTECTION = *STD / *SAME
Specifies whether the same attributes for file protection and file security are to be set up for the target file as for the original one.
The coding table entered in the catalog (COD-CH-SET) is always entered in the catalog entry of the target file.
The performance attributes of the source file are not transferred (see output fields IO(PERF), IO(USAGE), DISK-WRITE, SHOW-FILE-ATTRIBUTES command).
PROTECTION = *STD
Specifies that the attributes of the original file for file protection and file security should not be applied to the target file. If the target file is to be newly created, it will be given the default attributes arising from the CREATE-FILE command. If the target file already exists, it will retain its previous protection attributes.
PROTECTION = *SAME
The target file is assigned the same file security and protection attributes as the source file (i.e. for BACKUP-CLASS, SAVED-PAG, NUM-OF-BACKUP-VERS, EXPIR-DATE, EXPIR-TIME, DESTROY, FREE-FOR-DEL, MANAGE-CLASS, USER-ACC, ACCESS, and the same passwords). The AUDIT value and the lock to prevent the release of memory space (SP-REL-LOCK=YES) are not transferred. For a BASIC-ACL and defined GUARDS, a distinction must be made between the following cases:
Target file on public disk or Net-Storage volume:
The file protection attributes set with BASIC-ACL or GUARDS are transferred.Target file on private disk:
If access is controlled by a GUARDS, system default attributes are set (USER-ACCESS=OWNER-ONLY, ACCESS=WRITE). If the file is only protected by a BASIC-ACL, the BASIC-ACL is transferred.Target file on tape:
Protection attributes are always set to system default values
(USER-ACCESS=ALL-USERS, ACCESS=WRITE).
The operand value PROTECTION=*SAME will be ignored in the following cases:
The target file is a temporary file.
The target file is a file generation (for which the attributes for protection and security are defined in the group entry).
A nonprivileged user specifies a target file with a foreign user ID.
As management classes are pubset-specific they can only be taken over if the source and target files reside on the same pubset. When copying to another pubset an existing target file retains its management class; a new target file is assigned MANAGEMENT-CLASS=*NONE
(as with PROTECTION=*STD
).
If a temporary file is copied into a permanent one and PROTECTION=*SAME is specified, the permanent file will be given the attribute BACKUP=E, i.e. the new file will be ignored when ARCHIVE backups are carried out. The value for BACKUP must be amended by a MODIFY-FILE-ATTRIBUTES command if the file is to be backed up automatically during ARCHIVE runs.
If a permanent file is copied into a temporary one and PROTECTION=*SAME is specified, the permanent file will be given the attribute NUM-OF-BACKUP-VERS=0, i.e. the new file will be ignored during next version backups.
If a temporary file is copied into a permanent one, it will be given the attribute NUM-OF-BACKUP-VERS=0, i.e. the new file will be ignored when version backups are carried out. If the file is to be included into version backup, the value > 0 must be specified by a MODIFY-FILE-ATTRIBUTES command.
The following applies for nonprivileged users when copying from a foreign user ID: If the original file is protected with BASIC-ACL or GUARDS (see the “SECOS” manual [35]), the target file’s protection attributes USER-ACCESS, ACCESS, BASIC-ACL, and GUARDS are set to system default values (see the CREATE-FILE command).
CHANGE-DATE = *STD / *SAME
Specifies whether the target file is to be given the same change date (CHANGE-DATE) as the source file.
CHANGE-DATE = *STD
The change date of the target file will be updated.
CHANGE-DATE = *SAME
The change date of the source file will be transferred to the target file. The specification will apply in the following cases:
The target file resides under a foreign user ID.
The target file is a file generation.
REPLACE-OLD-FILES = *YES / *NO / *BY-DIALOG
The user can specify here whether, if there is already a file cataloged under the name of the target file, it should be overwritten or whether the system should ask at execution time whether to overwrite any such file (REPLACE-OLD-FILES=*BY-DIALOG).
In batch mode, REPLACE-OLD-FILES=*NO always applies.
If the target file is a tape file, the operand REPLACE-OLD-FILES will be ignored. Any existing tape file with the same name will be overwritten with no message.
If the target file is empty, it will be overwritten without any message.
REPLACE-OLD-FILES = *YES
Specifies that any existing disk file should be overwritten without any message.
REPLACE-OLD-FILES = *NO
Any existing file will not be overwritten. The command is rejected. In procedures error handling is triggered (spin-off mechanism in non-S procedures or SDF-P error handling in S procedures).
REPLACE-OLD-FILES = *BY-DIALOG
The operand value *BY-DIALOG will only have any effect in interactive mode. It allows the user to decide in an interactive dialog with the system, whether to overwrite an existing target file or not. The query “OVERWRITE (Y/N?)” will be displayed. If the reply is “Y”, the target file will be overwritten without any further message.
If the reply is “N", the target file is not overwritten and a message to this effect is issued.
BLOCK-CONTROL-INFO = *KEEP-ATTRIBUTE / *IGNORE-ATTRIBUTE / *CHECK-REMOVAL
Specifies whether there may be any difference in the file attribute BLOCK-CONTROL-INFO (BLK-CONTR) for the original and target files (or in the TFT entry DMCOPY22).
During copying, data is transferred in blocks, i.e. without regard to the internal block structure of the file. For this reason, a file in K format (BLK-CONTR=PAMKEY) should not be copied into a file in NK format (BLK-CONTR=DATA or NO), or vice versa. Such transfers should be carried out using a utility routine which takes into account the internal block structure of the file (e.g. PERCON, PAMCONV).
*KEEP-ATTRIBUTE is the default setting, i.e. both files (or the TFT entry for DMCOPY22) must have the same BLOCK-CONTROL-INFO attribute.
However, for files whose internal block structure does not depend on the BLOCK-CONTROL-INFO attribute, copying can be permitted (e.g. PLAM libraries). By specifying the operand values IGNORE-ATTRIBUTE or CHECK-REMOVAL, differing BLOCK-CONTROL-INFO attributes can be accepted.
It is recommended that BLOCK-CONTROL-INFO=*CHECK-REMOVAL is specified if the operand BLOCK-CONTROL-INFO has earlier been defined by an /ADD-FILE-LINK LINK-NAME=DMCOPY22 command.
BLOCK-CONTROL-INFO = *KEEP-ATTRIBUTE
This attribute in the TFT entry for the target file, or in its catalog entry as appropriate, must match that for the original file. If this is not the case, the command is rejected.
BLOCK-CONTROL-INFO = *IGNORE-ATTRIBUTE
Allows any differences in the BLOCK-CONTROL-INFO attribute to be ignored in particular cases.
When a source file (BLK-CONTR=PAMKEY) is being copied to a file for which the BLOCK-CONTROL information is specified as BLK-CONTR=NO or BLK-CONTR=DATA, the PAM key will not be checked for possible user data.
This user data in the PAM key will no longer be available in the target file. If BLK-CONTR=DATA is specified for the target file, the first twelve bytes of each logical block which is copied will be overwritten with the BLOCK-CONTROL information.
Copying is possible in the following cases:
BLOCK-CONTROL-INFO in the output field BLK-CONTR | |
---|---|
Original file | Target file |
PAMKEY | DATA (disk file only |
PAMKEY | NO |
DATA (disk file only | PAMKEY |
NO | PAMKEY |
BLOCK-CONTROL-INFO = *CHECK-REMOVAL
Any differences in the BLOCK-CONTROL-INFO attribute will only be ignored if no user data would be lost from the PAM key during copying. When an original file for which the BLOCK-CONTROL-INFO attribute is BLK-CONTR=PAMKEY is being copied into a target file in NK format (BLK-CONTR=DATA or NO), the PAM keys will be checked for user data. If the user part of the PAM key does contain data, then the COPY-FILE command will be rejected. This ensures that no user data will be lost.
Copying is possible in the following cases (if no user data is lost):
BLOCK-CONTROL-INFO in the output field BLK-CONTR | |
---|---|
Original file | Target file |
PAMKEY | DATA (disk file only |
PAMKEY | NO |
IGNORE-PROTECTION = *NO / *SOURCE-FILE / *TARGET-FILE
Specifies whether systems support wishes to circumvent the file protection, and if so for which file.
IGNORE-PROTECTION = *NO
The default option is that the existing file protection on the source and destination files will be observed.
IGNORE-PROTECTION = *SOURCE-FILE
The protection attributes of the source file, which the file’s owner declared when creating the file, are to be ignored for privileged users (system administration). The protection may be by READ or EXEC-PASSWORD attributes, and by enhanced protection measures using BASIC-ACL or GUARDS.
IGNORE-PROTECTION = *TARGET-FILE
For privileged users (systems support), the protection attributes of the destination file are to be ignored when the source file is copied. The protection may be by ACCESS- or EXPIRATION-DATE, READ-/WRITE- or EXEC-PASSWORD attributes, and by enhanced protection measures using BASIC-ACL or GUARDS.
DIALOG-CONTROL = *STD / *NO / *ERROR / *FILE-CHANGE / *MORE-THAN-ONE-FILE /
*CATALOG-CHANGE / *USER-ID-CHANGE
Specifies whether and under what conditions a verification dialog is to be conducted with the user during command execution. The verification dialog allows you to monitor the progress of the command and to take action if necessary. A control dialog is only possible in interactive mode but, in this mode, may also be used in procedures. In batch mode, all operand values have the same effect as *NO.
If one of the events (apart from *ERROR) specified in the DIALOG-CONTROL operand occurs, a verification dialog is initiated. Message DMS0810 is issued, asking you whether you want the command to be executed for the shown file or file set. The SDF abbreviation rules apply to the entered response. To display the possible responses, enter a question mark.
Syntax of replies to message DMS0810 (verification dialog):
|
Meaning of the operands
The meaning of the DIALOG-CONTROL and OUTPUT suboperands is the same as that of the corresponding main command operands. The operand value *UNCHANGED leaves the previous setting unchanged.
Reply *YES(...)
The set of files listed in the message is processed. If you specify a new value in the DIALOG-CONTROL operand which calls for a reduction in the size of the set of files listed in the message (e.g. changing *CATALOG-CHANGE to *FILE-CHANGE), the file set is first slimmed down to reflect the new value, and then a second verification dialog is conducted for the reduced set of files.
The meaning of the DIALOG-CONTROL and OUTPUT suboperands is the same as that of the corresponding main command operands.
Reply *NO(...)
The set of files listed in the message is not processed. If you change the DIALOG-CONTROL operand, the verification check is not repeated until the next time the associated event occurs. If there are other files to process before the event occurs, they will be processed without verification.
Reply *TERMINATE
The set of files listed in the message is not processed and processing of the command terminates. Within a procedure, error handling (spin-off or SDF-P error handling) is initiated.
If an error occurs while one of the selected files is being processed and DIALOG-
CONTROL has a setting other than *NO, an error verification dialog is initiated. Guaranteed message DMS0812 shows you the names of the source and target files in question and the DMS error code. You are then asked by message DMS0813 whether and if so how command execution is to continue. The SDF abbreviation rules apply to the entered response. To display the possible responses, enter a question mark.
Syntax of replies to message DMS0813 (error verification dialog)
|
Meaning of the operands
The meaning of the DIALOG-CONTROL and OUTPUT suboperands is the same as that of the corresponding main command operands. The operand value *UNCHANGED leaves the previous setting unchanged.
Reply *YES(...)
Processing is to continue with the next file name.
Reply *RETRY(...)
Processing is to be retried for the same file name.
Reply *SKIP-CATALOG(...)
Processing is to continue with the file names from the next selected catalog. This selection only makes sense if wildcards were used in the catalog ID.
Reply *SKIP-USER-ID(...)
Processing is to continue with the file names from the next selected user ID. If file names of a user ID on different pubsets have been selected, processing is to continue with the file names from the next selected catalog ID. This selection only makes sense if wildcards were used in the user or catalog ID.
DIALOG-CONTROL = *STD
The default *STD setting is equivalent to *MORE-THAN-ONE-FILE in an interactive dialog (when SYSCMD is connected to the terminal) and to *NO in procedures and in batch mode.
DIALOG-CONTROL = *NO
All the selected files are processed without an opportunity for the user to intervene.
DIALOG-CONTROL = *MORE-THAN-ONE-FILE
A verification dialog is initiated if more than one file has been selected.
The verification query is issued for each of the selected files. If the catalog and/or user ID contains wildcards, the query is issued for each catalog and/or user ID.
DIALOG-CONTROL=*ERROR also applies implicitly.
DIALOG-CONTROL = *ERROR
An error verification dialog is initiated if an error occurs while one of the selected file names is being processed.
DIALOG-CONTROL = *FILE-CHANGE
A verification dialog is initiated for each selected file name. DIALOG-CONTROL=*ERROR also applies implicitly.
DIALOG-CONTROL = *CATALOG-CHANGE
The verification query is issued for all the selected file names in a catalog. DIALOG-CONTROL=*ERROR also applies implicitly.
DIALOG-CONTROL = *USER-ID-CHANGE
The verification query is issued for all the selected file names of a user ID within a catalog. DIALOG-CONTROL=*ERROR also applies implicitly.
OUTPUT = *NO / *SYSOUT
Specifies whether the names of processed files are to be logged on SYSOUT.
OUTPUT = *NO
Only any errors that occur are logged on SYSOUT.
OUTPUT = *SYSOUT
The names of processed files and any errors that occur are logged on SYSOUT (guaranteed messages DMS0816 and DMS0812).
Return codes
(SC2) | SC1 | Maincode | Meaning/Guaranteed messages |
---|---|---|---|
0 | CMD0001 | Command executed | |
2 | 0 | DMS0546 | Catalog entry for specified file has reached maximum size |
2 | 0 | DMS054A | Insufficient disk space or access to disk not possible |
2 | 0 | DMS05F5 | Some blocks of the source file could not be copied. |
1 | CMD0202 | Syntax or semantic error in command | |
32 | DMS0584 | A state that does not allow the function to continue was reported during processing. | |
32 | DMS05C7 | Unexpected internal error in DMS | |
64 | DMS0585 | Error detected when processing catalog or multiprocessor system. | |
64 | CMD0102 | Interrupted by K2 key | |
64 | CMD0216 | Privilege error | |
64 | DMS0501 | Requested catalog not available | |
64 | DMS0512 | Requested catalog not found | |
64 | DMS051A | File already exists | |
64 | DMS051B | Requested user ID not in pubset | |
64 | DMS051C | User not authorized to access pubset | |
64 | DMS0533 | Requested file not cataloged in pubset | |
64 | DMS0535 | Specified file not shareable | |
64 | DMS057B | Invalid operand for migrated file | |
64 | DMS057C | Processing not possible due to HSMS error | |
64 | DMS057E | File has been migrated, and HSMS is not available | |
64 | DMS0586 | It is not possible to access or reserve a volume at present | |
64 | DMS0587 | Use of the specified command has been restricted by the system administrator | |
64 | DMS0588 | The disk storage assignment could not be executed | |
64 | DMS05F8 | DMS error reported | |
64 | DMS05F9 | File attributes in source and target file not compatible | |
64 | DMS05FC | Specified user ID not in HOME pubset | |
64 | DMS0609 | No access to system file | |
64 | DMS0610 | Action with selection specification (wildcards): command execution failed for at least one of the selected files | |
64 | DMS0698 | File generation groups do not have the same attributes | |
64 | DMS06B5 | File already open or catalog entry not updated after system error | |
64 | DMS06B6 | File attributes not compatible with file generation group | |
64 | DMS06C4 | File generation group not yet cataloged | |
64 | DMS06D0 | Specified file generation does not exist | |
64 | DMS06FF | BCAM connection severed | |
128 | DMS0506 | Function not executed due to change in master | |
130 | DMS0524 | System address space exhausted | |
130 | DMS053C | No space in pubset catalog file | |
130 | DMS0582 | File is currently locked or being used and cannot be processed | |
130 | DMS0585 | Error detected when processing catalog or multiprocessor system. | |
130 | DMS0586 | It is not possible to access or reserve a volume at present | |
130 | DMS0588 | The disk storage assignment could not be executed | |
130 | DMS0594 | Not enough virtual memory available | |
130 | DMS05C8 | Maximum permitted number of files reached |
Examples
Example 1: Copying with PROTECTION=*SAME
/sh-f-at paul.file.2,inf=(sec=*yes) —————————————————————————————————— (1)
%0000000003 :2OSG:$USER1.PAUL.FILE.2 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % OWNER = R W X GROUP = - - - OTHERS = - - - % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-18 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/copy-file from=paul.file.2,to=karl.p-2 —————————————————————————————— (2)
/show-file-attr karl.p-2,sec=*yes ————————————————————————————— (3)
%0000000003 :2OSG:$USER1.KARL.P-2 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/copy-file from=paul.file.2,to=karl.p-2,prot=*same ————————————————————— (4)
/show-file-attr karl.p-2,sec=*yes ————————————————————————————— (5)
%0000000003 :2OSG:$USER1.KARL.P-2 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % OWNER = R W X GROUP = - - - OTHERS = - - - % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/show-file-attr proc.mini.2,inf=(sec=*yes) ——————————————————————————— (6)
%0000000003 :2OSG:$USER1.PROC.MINI.2 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = YES % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-18 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/show-file-attr bsp.proc.1,inf=(sec=*yes) ——————————————————————— (7)
% ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = YES EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-18 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/copy-file from=proc.mini.2,to=bsp.proc.1,prot=*same —————————————————————— (8)
% DMS05F3 REQUIRED PASSWORD IS NOT IN PASSWORD TABLE. ENTER PASSWORD AND RETRY COMMAND LATER
/add-pass 'maxi' ———————————————————————————————————————————————— (9)
/copy-file from=proc.mini.2,to=bsp.proc.1,prot=*same —————————————————— (10)
% DMS05F3 REQUIRED PASSWORD IS NOT IN PASSWORD TABLE. ENTER PASSWORD AND RETRY COMMAND LATER
/add-pass 'otto' ———————————————————————————————————————————————— (11)
/copy-file from=proc.mini.2,to=bsp.proc.1,prot=*same ————————————————— (12)
/show-file-attr bsp.proc.1,inf=(sec=*yes) ——————————————————————— (13)
%0000000003 :2OSG:$USER1.BSP.PROC.1 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = YES % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
(1) | Output of the protection attributes for the file PAUL.FILE.2. The file has a BASIC-ACL entry. Access control is implemented via an BASIC-ACL (highest activated access protection). |
(2) | Copies the file PAUL.FILE.2 to the file CARL.P-2, thus creating its catalog entry with default attributes (see the CREATE-FILE command). |
(3) | Output of the protection attributes for the file CARL.P-2. The file is only protected via the standard access control list (ACCESS and USER-ACCESS). |
(4) | The file PAUL.FILE.2 is copied to the file CARL.P-2 again. In this case, PROTECTION=*SAME defines the transfer of protection attributes from the source file. |
(5) | Output of the protection attributes for the file CARL.P-2. The file has the same protection attributes as the source file PAUL.FILE.2 (see step 1). |
(6) | Output of the protection attributes the file PROC.MINI.2. The file is protected by an execute password ( ‘ MAXI’). |
(7) | Output of the protection attributes the file BSP.PROC.1. The file is protected by a write password ( ‘JOHN’). |
(8) | Attempts to copy the file PROC.MINI.2 to the file EXP.PROC.1. The password for read access to PROC.MINI.2 is not yet contained in the password table of the task. So the COPY-FILE command is rejected. |
(9) | Entry of the password ‘MAXI’ into the password table of the task (see step 6). |
(10) | Attempts to copy the file PROC.MINI.2 to the file EXP.PROC.1. The password for write access to EXP.PROC.1 is not yet contained in the password table of the task. So the COPY-FILE command is rejected. |
(11) | Entry of the password ‘JOHN’ into the password table of the task (see step 7). |
(12) | Attempts to copy the file PROC.MINI.2 to the file EXP.PROC.1. |
(13) | Output of the protection attributes the file BSP.PROC.1. Since PROTECTION= *SAME is specified, the file has the same protection attributes as the source file PROC.MINI.2, i.e. it is now protected by the execute password ‘MAXI’. |
Example 2: Copying a file generation group to a file
/show-file-attr max.group.2,select=(gen=*yes) ————————————————————— (1)
% 0 :2OS2:$USER1.MAX.GROUP.2 (FGG) % 3 :2OS2:$USER1.MAX.GROUP.2(*0011) % 3 :2OS2:$USER1.MAX.GROUP.2(*0012) % 3 :2OS2:$USER1.MAX.GROUP.2(*0013) %:2OS2: PUBLIC: 4 FILES RES= 9 FRE= 6 REL= 0 PAGES
/show-file-attr max.group.2,inf=(org=*yes) ————————————————————— (2)
%0000000000 :2OS2:$USER1.MAX.GROUP.2 (FGG) (3) % ------------------------------- GENERATION-INFO ---------------------------- % MAXIMUM = 3 BASE-NUM = 11 OVERFL-OPT = CYCL-REPL % FIRST-GEN = 11 LAST-GEN = 13 %:2OS2: PUBLIC: 1 FILE RES= 0 FRE= 0 REL= 0 PAGES
/show-file-attr max.file.1,inf=(org=*yes) ———————————————————— (4)
%0000000003 :2OS2:$USER1.MAX.FILE.1 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = NONE BUF-LEN = NONE BLK-CONTR = NONE % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % REC-FORM = NONE REC-SIZE = 0 % AVAIL = *STD %:2OS2: PUBLIC: 1 FILE RES= 3 FRE= 3 REL= 3 PAGES /copy-file from=max.group.2,to=max.file.1
/copy-file from=max.group.2,to=max.file.1
/show-file-attr max.file.1,inf=(org=*yes) ———————————————————— (5)
%0000000003 :2OS2:$USER1.MAX.FILE.1 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = SAM BUF-LEN = STD(1) BLK-CONTR = PAMKEY % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % REC-FORM = (V,N) REC-SIZE = 0 %:2OS2: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/show-file max.file.1 ———————————————————————————————————————————————————— (6)
************************************************************ ******* Inhalt von MAX.GROUP.2(*0011) ****** ************************************************************ ...................................................(Ende)... ************************************************************ ******* Inhalt von MAX.GROUP.2(*0012) ****** ************************************************************ ...................................................(Ende)... ************************************************************ ******* Inhalt von MAX.GROUP.2(*0013) ****** ************************************************************ ...................................................(Ende)... % SHO0301 WARNING: END OF FILE REACHED e S*SOF+ 1( 1)
(1) | Output of the catalog entries for the file generation group MAX.GROUP.2 with the associated generations. The existing generations are *0011, *0012, and *0013. |
(2) | Output of the group entry with the specific attributes of a file generation group. |
(3) | Output of the catalog entry for the file MAX.FILE.1 with the file organization information. The file has not yet been opened for writing (as is evident from FILE-STRUC=NONE, for example). |
(4) | Copies the file generation group MAX.GROUP.2 to the file MAX.FILE.1. |
(5) | Output of the catalog entry for the file MAX.FILE.1 with the file organization information. The file was created as a SAM file and now occupies three PAM pages (see FRE=0). |
(6) | Output of the content of file MAX.FILE.1 using the command SHOW-FILE. The output is terminated with E (END). |
Example 3: Copying a file generation group to a file generation group
/show-file-attr max.group.2,inf=(org=*yes) —————————————————————— (1)
%0000000000 :2OS2:$USER1.MAX.GROUP.2 (FGG) % ------------------------------- GENERATION-INFO ---------------------------- % MAXIMUM = 3 BASE-NUM = 11 OVERFL-OPT = CYCL-REPL % FIRST-GEN = 11 LAST-GEN = 13 %:2OS2: PUBLIC: 1 FILE RES= 0 FRE= 0 REL= 0 PAGES
/cre-file-group group=max.group.2.copy,gen-par=(max=3) ————————————————— (2)
/show-file-attr max.group.2.copy,inf=(org=*yes) —————————————————————— (3)
%0000000000 :2OS2:$USER1.MAX.GROUP.2.COPY (FGG) % ------------------------------- GENERATION-INFO ---------------------------- % MAXIMUM = 3 BASE-NUM = 0 OVERFL-OPT = CYCL-REPL % FIRST-GEN = 0 LAST-GEN = 0 %:2OS2: PUBLIC: 1 FILE RES= 0 FRE= 0 REL= 0 PAGES
/copy-file from=max.group.2,to=max.group.2.copy —————————————————————— (4)
/show-file-attr max.group.2.copy,gen=*yes ————————————————————— (5)
% 0 :2OS2:$USER1.MAX.GROUP.2.COPY (FGG) % 3 :2OS2:$USER1.MAX.GROUP.2.COPY(*0001) % 3 :2OS2:$USER1.MAX.GROUP.2.COPY(*0002) % 3 :2OS2:$USER1.MAX.GROUP.2.COPY(*0003) %:2OS2: PUBLIC: 4 FILES RES= 9 FRE= 6 REL= 0 PAGES
/show-file max.group.2.copy(*1) —————————————————————————————————————————— (6)
************************************************************ ******* Inhalt von MAX.GROUP.2(*0011) ****** ************************************************************ ...................................................(Ende)... % SHO0301 WARNING: END OF FILE REACHED e S*SOF+ 1( 1)
/show-file max.group.2.copy(*2) ———————————————————————————————————————— (7)
************************************************************ ******* Inhalt von MAX.GROUP.2(*0012) ****** ************************************************************ ...................................................(Ende)... % SHO0301 WARNING: END OF FILE REACHED e S*SOF+ 1( 1)
/show-file max.group.2.copy(*3) —————————————————————————————————————————— (8)
************************************************************ ******* Inhalt von MAX.GROUP.2(*0013) ****** ************************************************************ ...................................................(Ende)... % SHO0301 WARNING: END OF FILE REACHED e S*SOF+ 1( 1)
(1) | Output of the group entry MAX.GROUP.2 with the specific attributes of a file generation group. The three existing generations are *0011, *0012, and *0013 (see LAST-GEN=13 or example 2). |
(2) | Creates a group entry for the file generation group MAX.GROUP.2.COPY. The maximum number of generations is set to 3, as for MAX.GROUP.2. |
(3) | Output of the newly created group entry MAX.GROUP.2.COPY with the specific attributes of a file generation group. |
(4) | Copies the file generation group MAX.GROUP.2 to the file generation group MAX.GROUP.COPY. |
(5) | Output of the catalog entries for the file generation group MAX.GROUP.2.COPY with the associated generations. Generations *0001, *0002 and *0003 have been created. |
(6) | Output of the file contents of the generation MAX.GROUP.2.COPY(*0001) with the SHOW-FILE command. The contents of the first generation of MAX.GROUP.2, i.e. the generation *0011, has been copied into the first generation. The output is terminated with E (END). |
(7) | Output of the file contents of the generation MAX.GROUP.2.COPY(*0002) with the SHOW-FILE command. The contents of the second generation of MAX.GROUP.2, i.e. generation *0012, has been copied into the second generation. The output is terminated with E (END). |
(8) | Output of the file contents of the generation MAX.GROUP.2.COPY(*0003) with the SHOW-FILE command. The contents of the third generation of MAX.GROUP.2, i.e. generation *0013, has been copied into the third generation. The output is terminated with E (END). |
Example 4: Copying temporary files
/show-file-attr proc.mini.2,inf=(sec=*yes,backup=*yes) ————————————————— (1)
%0000000003 :2OSG:$USER1.PROC.MINI.2 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = YES % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE % ------------------------------- BACKUP ------------------------------- % BACK-CLASS = A SAVED-PAG = COMPL-FILE VERSION = 1 % MIGRATE = ALLOWED % #BACK-VERS = 0 %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/add-pass 'maxi' ——————————————————— (2)
/copy-file from=proc.mini.2,to=#temp.file.1,prot=*same —————————————————— (3)
/show-file-attr #temp.file.1,inf=(sec=*yes,backup=*yes) ————————————————— (4)
%0000000003 :2OSG:$USER1.S.163.34JG.TEMP.FILE.1 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE % ------------------------------- BACKUP ------------------------------- % BACK-CLASS = E SAVED-PAG = COMPL-FILE VERSION = 1 % MIGRATE = INHIBITED % #BACK-VERS = 0 %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/copy-file from=#temp.file.1,to=max.file.2,prot=*same —————————————————— (5)
/show-file-attr max.file.2,inf=(sec=*yes,backup=*yes) ————————————————— (6)
%0000000003 :2OSG:$USER1.MAX.FILE.2 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE % ------------------------------- BACKUP ------------------------------- % BACK-CLASS = E SAVED-PAG = COMPL-FILE VERSION = 1 % MIGRATE = INHIBITED % #BACK-VERS = 0 %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
/show-file-attr max.file.3,inf=(sec=*yes,backup=*yes) ———————————————— (7)
%0000000003 :2OSG:$USER1.MAX.FILE.3 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % OWNER = R W X GROUP = - - - OTHERS = - - - % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = NONE % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = NONE % SP-REL-LOCK= NO ENCRYPTION = *NONE % ------------------------------- BACKUP ------------------------------- % BACK-CLASS = A SAVED-PAG = COMPL-FILE VERSION = 0 % MIGRATE = ALLOWED % #BACK-VERS = 0 %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 3 REL= 3 PAGES
/copy-file from=#temp.file.1,to=max.file.3 —————————————————— (8)
/show-file-attr max.file.3,inf=(sec=*yes,backup=*yes) ———————————————— (9)
%0000000003 :2OSG:$USER1.MAX.FILE.3 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % OWNER = R W X GROUP = - - - OTHERS = - - - % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE % ------------------------------- BACKUP ------------------------------- % BACK-CLASS = A SAVED-PAG = COMPL-FILE VERSION = 1 % MIGRATE = ALLOWED % #BACK-VERS = 0 %:2OSG: PUBLIC: 1 FILE RES= 3 FRE= 0 REL= 0 PAGES
(1) | Output of the catalog entry for the file PROC.MINI.2 with the attributes for file protection and file security. The file is accessible to all users (USER-ACCESS=ALL-USER) who also know the defined execute password ‘MAXI’. |
(2) | Entry of the password ‘MAXI’ into the password table of the task. |
(3) | Copies the file PROC.MINI.2 to the temporary file TEMP.FILE.1 with PROTECTION=*SAME. |
(4) | Output of the catalog entry for the temporary file TEMP.FILE.1 with the file protection and backup attributes for the file. Default attributes have been set for the temporary file, as it is not possible to transfer a password, BACKUP-CLASS=A, or USER-ACCESS=ALL-USERS, e.g. (see also the CREATE-FILE command). |
(5) | Copies the temporary file TEMP.FILE.1 to the file MAX.FILE.2 with PROTECTION= *SAME. |
(6) | The catalog entry indicates that the file protection and backup attributes of the temporary file have been copied. |
(7) | Output of the catalog entry for the file MAX.FILE.3 with the file protection and backup attributes. The file is protected by means of a BASIC-ACL. |
(8) | Copies the temporary file TEMP.FILE.1 to the file MAX.FILE.3. |
(9) | Output of the catalog entry for the file MAX.FILE.3 with the file protection and backup attributes. These attributes have not been changed. |
Example 5: Copying an existing file interactively
/copy-file from=max.file.1,to=max.file.10,replace-old=*by-dialog —————— (1)
% DMS0518 FILE ':2OS2:$USER1.MAX.FILE.10' ALREADY EXISTS. OVERWRITE? REPLY (Y=YES; N=NO)?
n ————————————————————————————————————————————————— (2)
% DMS0519 COPY COMMAND WITHDRAWN BY CALLER
/copy-file from=max.file.1,to=max.file.11,replace-old=*by-dialog ———————— (3)
(1) | Specifies that the file MAX.FILE.1 is to be copied to the file MAX.FILE.10 and that a prompt is to be issued before overwriting any existing target file. |
(2) | The file MAX.FILE.10 already exists. N is entered in response to the prompt. So the COPY-FILE command is not executed. |
(3) | Specifies that the file MAX.FILE.1 is to be copied to the file MAX.FILE.11 and that a prompt is to be issued before overwriting any existing target file. Since the target file does not exist in this case, the COPY-FILE command is executed without a prompt. |
Example 6: Copying a file on private disk
/cre-file max.priv-file.1,sup=priv(vol=work01,dev-type=d3435) ————————— (1)
/show-file-attr max.priv-file.1,inf=(org=*yes,alloc=*yes) ——————— (2)
%0000000003*:2OSG:$USER1.MAX.PRIV-FILE.1 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = NONE BUF-LEN = NONE BLK-CONTR = NONE % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % REC-FORM = NONE REC-SIZE = 0 % AVAIL = *STD % ------------------------------- ALLOCATION ------------------------------- % SUPPORT = PVT S-ALLOC = 9 HIGH-US-PA = 0 % EXTENTS VOLUME DEVICE-TYPE EXTENTS VOLUME DEVICE-TYPE % 1 WORK01 D3435 % NUM-OF-EXT = 1 %:2OSG: PRDISC: 1 FILE RES= 3 FRE= 3 REL= 0 PAGES
/copy-file from=max.file.1,to=max.priv-file.1 ———————————— (3)
/show-file-attr max.priv-file.1,inf=(org=*yes,alloc=*yes) ————————— (4)
%0000000003*:2OSG:$USER1.MAX.PRIV-FILE.1 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = NONE BUF-LEN = NONE BLK-CONTR = NONE % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % REC-FORM = NONE REC-SIZE = 0 % AVAIL = *STD % ------------------------------- ALLOCATION ------------------------------- % SUPPORT = PVT S-ALLOC = 9 HIGH-US-PA = 0 % EXTENTS VOLUME DEVICE-TYPE EXTENTS VOLUME DEVICE-TYPE % 1 WORK01 D3435 % NUM-OF-EXT = 1 %:2OSG: PRDISC: 1 FILE RES= 3 FRE= 3 REL= 0 PAGES
(1) | Creates a catalog entry for the file MAX.PRIV-FILE.1, which is to be stored on the private disk WORK01. |
(2) | Output of the newly created catalog entry showing information on the file organization and the volume allocation. Since the file has not yet been opened, information on the file structure is not yet available (e.g. FILE-STRUC=NONE). |
(3) | Copies the file MAX.FILE.1 to the file MAX.PRIV-FILE.1. |
(4) | Output of the catalog entry for the file MAX.PRIV-FILE.1 showing information on the file organization and volume allocation. The file attributes (e.g. FILE-STRUC=ISAM) were entered during on executing the COPY-FILE command. |
Example 7: Copying a file to a tape file (tape cartridge)
/show-file-attr max.tape-file.1,inf=(org=*yes,alloc=*yes) ———————— (1)
% :2OS2:$USER1.MAX.TAPE-FILE.1 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = NONE BUF-LEN = NONE BLK-CONTR = NONE % REC-FORM = NONE REC-SIZE = 0 % CODE = NONE LABEL = NONE FILE-SEQ = NONE % BLK-OFFSET = 0 % ------------------------------- ALLOCATION ------------------------------- % SUPPORT = PVT BLK-COUNT = 0 % EXTENTS VOLUME DEVICE-TYPE EXTENTS VOLUME DEVICE-TYPE % ( D2315K TAPE-C4 ) %:2OS2: TAPE : 1 FILE
/add-file-link link=dmcopy22,file-name=max.tape-file.1,
sup=*tape(vol=*catalog) ———————— (2)
/show-file-attr max.file.<4,5>,inf=(sec=*yes,org=y*es) ———————— (3)
%0000000018 :2OS2:$USER1.MAX.FILE.4 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % OWNER = R W X GROUP = - - - OTHERS = - - - % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = SAM BUF-LEN = STD(1) BLK-CONTR = PAMKEY % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % REC-FORM = (V,N) REC-SIZE = 0 %00000006 :2OS2:$USER1.MAX.FILE.5 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = OWNER-ONLY ACCESS = WRITE ACL = NO % OWNER = R W X GROUP = - - - OTHERS = - - - % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % SP-REL-LOCK= NO ENCRYPTION = *NONE % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = SAM BUF-LEN = STD(1) BLK-CONTR = PAMKEY % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % REC-FORM = (V,N) REC-SIZE = 0 %:2OS2: PUBLIC: 2 FILES RES= 24 FRE= 5 REL= 3 PAGES
/show-file-link link=dmcopy22,inf=(file-contr=*yes) ————————— (4)
% %-- LINK-NAME --------- FILE-NAME --------------------------------------------- % T DMCOPY22 :2OS2:$USER1.MAX.TAPE-FILE.1 % -------------------- FILE-CONTROL-BLOCK - GENERAL ATTRIBUTES ------------- % ACC-METH = *BY-PROG OPEN-MODE = *BY-PROG REC-FORM = *BY-PROG % REC-SIZE = *BY-PROG BUF-LEN = *BY-PROG BLK-CONTR = *BY-PROG % F-CL-MSG = STD CLOSE-MODE = *BY-PROG % -------------------- FILE-CONTROL-BLOCK - DISK FILE ATTRIBUTES ----------- % SHARED-UPD = *BY-PROG WR-CHECK = *BY-PROG IO(PERF) = *BY-PROG % IO(USAGE) = *BY-PROG LOCK-ENV = *BY-PROG % -------------------- FILE-CONTROL-BLOCK - TAPE FILE ATTRIBUTES ----------- % LABEL = *BY-PROG (DIN-R-NUM = *BY-PROG, TAPE-MARK = *BY-PROG) % CODE = *BY-PROG EBCDIC-TR = *BY-PROG F-SEQ = *BY-PROG % CP-AT-BLIM = *BY-PROG CP-AT-FEOV = *BY-PROG BLOCK-LIM = *BY-PROG % REST-USAGE = *BY-PROG BLOCK-OFF = *BY-PROG TAPE-WRITE = *BY-PROG % STREAM = *BY-PROG % -------------------- FILE-CONTROL-BLOCK - ISAM FILE ATTRIBUTES ----------- % KEY-POS = *BY-PROG KEY-LEN = *BY-PROG POOL-LINK = *BY-PROG % LOGIC-FLAG = *BY-PROG VAL-FLAG = *BY-PROG PROPA-VAL = *BY-PROG % DUP-KEY = *BY-PROG PAD-FACT = *BY-PROG READ-I-ADV = *BY-PROG % WR-IMMED = *BY-PROG POOL-SIZE = *BY-PROG
/copy-file from=max.file.5,to=max.tape-file.1,prot=*same ————————— (5)
/show-file-attr max.tape-file.1,inf=(org=*yes,alloc=yes,sec=*yes) ———— (6)
% :2OS2:$USER1.MAX.TAPE-FILE.1 % ------------------------------- HISTORY ------------------------------- % CRE-DATE = 2012-03-19 ACC-DATE = 2012-03-19 CHANG-DATE = 2012-03-19 % CRE-TIME = 00:00:00 ACC-TIME = 00:00:00 CHANG-TIME = 00:00:00 % ACC-COUNT = 1 S-ALLO-NUM = 0 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = ALL-USERS ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % ------------------------------- BACKUP ------------------------------- % BACK-CLASS = A SAVED-PAG = COMPL-FILE VERSION = 1 % #BACK-VERS = 0 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = SAM BUF-LEN = STD(1) BLK-CONTR = PAMKEY % REC-FORM = (V,N) REC-SIZE = 2044 % CODE = EBCDIC LABEL = (STD,1) FILE-SEQ = 1 % BLK-OFFSET = 4 % ------------------------------- ALLOCATION ------------------------------- % SUPPORT = PVT BLK-COUNT = 5 % EXTENTS VOLUME DEVICE-TYPE EXTENTS VOLUME DEVICE-TYPE % D2315K TAPE-C4 %:2OS2: TAPE : 1 FILE
/cre-file max.tape-file.2,sup=*tape(vol=d2315k,dev-type=tape-c4) ——————— (7)
/add-file-link link=dmcopy22,file-name=max.tape-file.2, ———————————————— (8)
sup=tape(vol=*catalog,file-sequence=*new)
/show-file-link link=dmcopy22,inf=(file-contr=*yes) ————————— (9)
% %-- LINK-NAME --------- FILE-NAME --------------------------------------------- % T DMCOPY22 :2OS2:$USER1.MAX.TAPE-FILE.2 % -------------------- FILE-CONTROL-BLOCK GENERAL ATTRIBUTES ------------- % ACC-METH = *BY-PROG OPEN-MODE = *BY-PROG REC-FORM = *BY-PROG % REC-SIZE = *BY-PROG BUF-LEN = *BY-PROG BLK-CONTR = *BY-PROG % F-CL-MSG = STD CLOSE-MODE = *BY-PROG % -------------------- FILE-CONTROL-BLOCK DISK FILE ATTRIBUTES ----------- % SHARED-UPD = *BY-PROG WR-CHECK = *BY-PROG IO(PERF) = *BY-PROG % IO(USAGE) = *BY-PROG LOCK-ENV = *BY-PROG % -------------------- FILE-CONTROL-BLOCK TAPE FILE ATTRIBUTES ----------- % LABEL = *BY-PROG (DIN-R-NUM = *BY-PROG, TAPE-MARK = *BY-PROG) % CODE = *BY-PROG EBCDIC-TR = *BY-PROG F-SEQ = NEW % CP-AT-BLIM = *BY-PROG CP-AT-FEOV = *BY-PROG BLOCK-LIM = *BY-PROG % REST-USAGE = *BY-PROG BLOCK-OFF = *BY-PROG TAPE-WRITE = *BY-PROG % STREAM = *BY-PROG % -------------------- FILE-CONTROL-BLOCK ISAM FILE ATTRIBUTES ----------- % KEY-POS = *BY-PROG KEY-LEN = *BY-PROG POOL-LINK = *BY-PROG % LOGIC-FLAG = *BY-PROG VAL-FLAG = *BY-PROG PROPA-VAL = *BY-PROG % DUP-KEY = *BY-PROG PAD-FACT = *BY-PROG READ-I-ADV = *BY-PROG % WR-IMMED = *BY-PROG POOL-SIZE = *BY-PROG
/copy-file from=max.file.4,to=max.tape-file.2,prot=*same ——————————— (10)
/show-file-attr max.tape-file.2,inf=(org=*yes,alloc=*yes,prot=*yes) ———— (11)
% :2OS2:$USER1.MAX.TAPE-FILE.2 % ------------------------------- HISTORY ------------------------------- % CRE-DATE = 2012-03-19 ACC-DATE = 2012-03-19 CHANG-DATE = 2012-03-19 % CRE-TIME = 00:00:00 ACC-TIME = 00:00:00 CHANG-TIME = 00:00:00 % ACC-COUNT = 1 S-ALLO-NUM = 0 % ------------------------------- SECURITY ------------------------------- % READ-PASS = NONE WRITE-PASS = NONE EXEC-PASS = NONE % USER-ACC = ALL-USERS ACCESS = WRITE ACL = NO % AUDIT = NONE FREE-DEL-D = *NONE EXPIR-DATE = 2012-03-19 % DESTROY = NO FREE-DEL-T = *NONE EXPIR-TIME = 00:00:00 % ------------------------------- BACKUP ------------------------------- % BACK-CLASS = A SAVED-PAG = COMPL-FILE VERSION = 1 % #BACK-VERS = 0 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = SAM BUF-LEN = STD(1) BLK-CONTR = PAMKEY % REC-FORM = (V,N) REC-SIZE = 2044 % CODE = EBCDIC LABEL = (STD,1) FILE-SEQ = 2 % BLK-OFFSET = 4 % ------------------------------- ALLOCATION ------------------------------- % SUPPORT = PVT BLK-COUNT = 14 % EXTENTS VOLUME DEVICE-TYPE EXTENTS VOLUME DEVICE-TYPE % D2315K TAPE-C4 %:2OS2: TAPE : 1 FILE
(1) | Output of the catalog entry for the file MAX.TAPE-FILE.1 showing information on the file organization and volume allocation. Only the catalog entry exists at this stage. The file has not yet been opened (e.g. FILE-STRUC=NONE). The data contained in the file is to be stored on the magnetic tape cartridge D2315K of volume type TAPE-C4. Since no volume has been reserved as yet, the volume ID is shown in parentheses. |
(2) | Creates a TFT entry with the link name DMCOPY22 for the file MAX.TAPE-FILE.1. The default link name of the COPY-FILE command is used for the target file. |
(3) | Output of the catalog entries for the files MAX.FILE.4 and MAX.FILE.5 showing the file protection information. Both files have a BASIC-ACL entry as the highest activated access control. The USER-ACCESS attribute is set to all users in each case. |
(4) | Output of the TFT entry with the link name DMCOPY.22 indicating the file processing attributes. |
(5) | Copies the file MAX.FILE.5 to the tape file MAX.TAPE-FILE.1 with PROTECTION= *SAME. |
(6) | Output of the catalog entry for the file MAX.TAPE-FILE.1 showing information on the file protection, file organization and volume allocation. The file attributes have been updated (e.g. FILE-STRUC=SAM). The file is located on volume D2315K. The BASIC-ACL could not be copied. The file is only protected by standard access control, with the USER-ACCESS attribute set to OWNER-ONLY. |
(7) | Creates a catalog entry for the tape file MAX.TAPE-FILE.2, which is also to be stored on the tape cartridge D2315K. |
(8) | Creates a TFT entry with the link name DMCOPY22 for the file MAX.TAPE-FILE.2. The default link name of the COPY-FILE command is used for the target file. Since this is the second file to be stored on the tape cartridge, FILE-SEQUENCE=*NEW (or alternatively, FILE-SEQUENCE=2) must also be specified. Without this specification, the default value FILE-SEQUENCE=1 would be assumed when executing the copy operation, and the first file would be overwritten. |
(9) | Output of the TFT entry with the link name DMCOPY22 showing the relevant file processing information (see also the F-SEQ output field). |
(10) | Copies the file MAX.FILE.5 to the tape file MAX.TAPE-FILE.2 with PROTECTION= *SAME. |
(11) | Output of the catalog entry for the file MAX.TAPE-FILE.2 showing the protection attributes, organization, and volume allocation for the file. The file attributes have been updated (e.g. FILE-STRUC=SAM). The file is located as the second file on volume D2315K. The BASIC-ACL could not be copied. The file is only protected by standard access control, with the USER-ACCESS attribute set to *ALL-USERS. |
Example 8: Changing the BLOCK-CONTROL-INFO when copying
/show-file-attr ah.lib,org=*yes —————————————————————————————— (1)
%0000000273 :2OSG:$USER1.ASS.PLAMLIB % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = PAM BUF-LEN = STD(1) BLK-CONTR = PAMKEY % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % TYPE = PLAM-LIB % AVAIL = *STD % WORK-FILE = *NO F-PREFORM = *NONE S0-MIGR = *ALLOWED %:2OSG: PUBLIC: 1 FILE RES= 273 FRE= 47 REL= 45 PAGES
/add-file-link link=dmcopy22,file-name=max.file.12,
block-contr=*no —————— (2)
/copy-file from=ah.lib,to=max.file.12,block-contr=*check-removal —————— (3)
/show-file-attr max.file.12,org=*yes —————————————————————————————— (4)
%0000000273 :2OSG:$USER1.MAX.FILE.12 % ------------------------------- ORGANIZATION ------------------------------- % FILE-STRUC = PAM BUF-LEN = STD(1) BLK-CONTR = NO % IO(USAGE) = READ-WRITE IO(PERF) = STD DISK-WRITE = IMMEDIATE % TYPE = PLAM-LIB % AVAIL = *STD % WORK-FILE = *NO F-PREFORM = *NONE S0-MIGR = *ALLOWED %:2OSG: PUBLIC: 1 FILE RES= 273 FRE= 47 REL= 45 PAGES
(1) | Output of the catalog entry for the file ASS.PLAMLIB showing the file organization. The file is a PLAM library that was created with BLOCK-CONTROL-INFO=*PAMKEY. The file is to be copied to an NK file with BLOCK-CONTROL-INFO=*NO. Since the internal block structure of the file does not depend on the PAMKEY, a different BLOCK-CONTROL-INFO is permitted when copying. |
(2) | Creates a TFT entry with the link name DMCOPY22 for the target file MAX.FILE.12 with BLOCK-CONTROL-INFO=*NO. The default link name of the COPY-FILE command is used for the target file. |
(3) | Copies the file ASS.PLAMLIB to the file MAX.FILE.12 with BLOCK-CONTROL-INFO= *CHECK-REMOVAL (copy only if no user information from the PAMKEY is lost). |
(4) | Output of the catalog entry for the target file MAX.FILE.12 showing the organization of the file. The file was created with BLOCK-CONTROL-INFO=*NO. |
Example 9: Copying two or more files with a COPY-FILE command
/copy-file from=<proc>.<ptest>.*,to=<2>-backup.<1>edure.<3>,
output=*sysout,dialog-contr=*file-change ——————————————————— (1)
% DMS0810 EXECUTE JOB FOR FILE(S) ':2OSG:$USER1.PROC.PTEST.EDT' (Y=YES; N=NO; T =TERMINATE; ?=HELP/FURTHER OPTIONS)?y % DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROC.PTEST.EDT' SUCCESSFULLY EXEC UTED WITH FILE NAME ':2OSG:$USER1.PTEST-BACKUP.PROCEDURE.EDT' % DMS0810 EXECUTE JOB FOR FILE(S) ':2OSG:$USER1.PROC.PTEST.KOSTEN' (Y=YES; N=NO ; T=TERMINATE; ?=HELP/FURTHER OPTIONS)?y % DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROC.PTEST.KOSTEN' SUCCESSFULLY E XECUTED WITH FILE NAME ':2OSG:$USER1.PTEST-BACKUP.PROCEDURE.KOSTEN' % DMS0810 EXECUTE JOB FOR FILE(S) ':2OSG:$USER1.PROC.PTEST.KOSTEN1' (Y=YES; N=N O; T=TERMINATE; ?=HELP/FURTHER OPTIONS)?y % DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROC.PTEST.KOSTEN1' SUCCESSFULLY EXECUTED WITH FILE NAME ':2OSG:$USER1.PTEST-BACKUP.PROCEDURE.KOSTEN1' % DMS0810 EXECUTE JOB FOR FILE(S) ':2OSG:$USER1.PROC.PTEST.KOSTEN2' (Y=YES; N=N O; T=TERMINATE; ?=HELP/FURTHER OPTIONS)?y % DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROC.PTEST.KOSTEN2' SUCCESSFULLY EXECUTED WITH FILE NAME ':2OSG:$USER1.PTEST-BACKUP.PROCEDURE.KOSTEN2' % DMS0810 EXECUTE JOB FOR FILE(S) ':2OSG:$USER1.PROC.PTEST.REVERSE' (Y=YES; N=N O; T=TERMINATE; ?=HELP/FURTHER OPTIONS)?y % DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROC.PTEST.REVERSE' SUCCESSFULLY EXECUTED WITH FILE NAME ':2OSG:$USER1.PTEST-BACKUP.PROCEDURE.REVERSE' % DMS0810 EXECUTE JOB FOR FILE(S) ':2OSG:$USER1.PROC.PTEST.STEUER' (Y=YES; N=NO ; T=TERMINATE; ?=HELP/FURTHER OPTIONS)?y % DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROC.PTEST.STEUER' SUCCESSFULLY E XECUTED WITH FILE NAME ':2OSG:$USER1.PTEST-BACKUP.PROCEDURE.STEUER'
/copy-file from=prot.*fehl/,to=fehlerprotokoll-/.*,output=*sysout———————— (2)
% DMS0810 EXECUTE JOB FOR FILE(S) ':2OSG:$USER1.PROT.*FEHL/' (Y=YES; N=NO; T=TE RMINATE; ?=HELP/FURTHER OPTIONS)?y % DMS0812 '05A9' DMS ERROR CODE OCCURRED DURING EXECUTION OF THE JOB FOR THE FI LE NAME ':2OSG:$USER1.PROT.SDFFRAME.FEHL1' WITH THE FILE NAME ':2OSG:$USER1.FEHL ERPROTOKOLL-1.SDFFRAME.'. FURTHER INFORMATION: /HELP-MSG DMS05A9 % DMS0813 CONTINUE JOB AFTER ERROR (Y=YES; N=NO; R=RETRY; ?=HELP/FURTHER OPTIONS?
y ————————————————————————————————————————————————————————————————————— (3)
% DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROT.VARFEHL1' SUCCESSFULLY EXECU TED WITH FILE NAME ':2OSG:$USER1.FEHLERPROTOKOLL-1.VAR' % DMS0816 JOB FOR THE FILE NAME ':2OSG:$USER1.PROT.VARFEHL2' SUCCESSFULLY EXECU TED WITH FILE NAME ':2OSG:$USER1.FEHLERPROTOKOLL-2.VAR'
(1) | All files whose first subname is PROC and whose second subname is PTEST are to be copied. The newly formed names are to have PTEST (second search string in index notation) and -BACKUP as the first subname. The second subname is to be made up of PROC (first search string) and EDURE. The third name part of the search string is to remain unchanged. Copying is to be confirmed for each file (DIALOG-CONTROL) and the new name is to be output to SYSOUT (OUTPUT). |
(2) | All files which begin with the subname PROT, contain a freely selectable character string and end with the string FEHL and another character are to be copied. The new names are to begin with the subname made up of the string FEHLERPROTOKOLL (= error log) and the last character of the search string. This is to be followed by the string identified by * in the search string. |
(3) | An error occurred when editing the file PROT.SDFFRAME.FEHL1. The newly formed name of the target file would end with a period and is therefore not possible. Processing is continued by entering YES. |