1 COPY Use the COPY command to copy portions of the directory hierarchy and their related data definitions from one area of the CDD to another. With the COPY command, you specify the dictionary directories, subdictionaries, and objects you want copied, and you specify the dictionary directory or subdictionary to which you want the copy appended. In addition to portions of the directory hierarchy, you can copy history and access control lists. You can also create a log of the given names of each copied dictionary directory, subdictionary, and object. Command Syntax: COPY [qualifiers] source-path-name [,source-path-name]... destination-path-name 2 parameters source-path-name Identifies the source of the copy. You can use the wildcards % and * in the last given name of the source path name, and you can use > or .> at the end of the chain. You cannot use @. If you are using a terminal of the VT200 family, you can use 8-bit characters in path names. DMU assumes a > at the end of the chain by default. Type "HELP specify path-name" for further information. Type "HELP specify versions" for further information about specifying versions of dictionary objects. destination-path-name Locates the dictionary directory or subdictionary into which the specified portions of the directory hierarchy are copied. You cannot use any wildcards in the destination path name. If you do not specify a destination path name, DMU uses your current default directory. Type "HELP specify path-name" for further information. 2 privileges o You need PASS_THRU and SEE at the dictionary directories, subdictionaries, and objects you want to copy. o You need PASS_THRU and EXTEND at the destination directories and subdictionaries, and you need UPDATE at dictionary objects as you create them. o You need HISTORY at both the source and destination to use the /AUDIT qualifier. o You need PASS_THRU, SEE, and UPDATE at the highest existing version of an object in the destination directory to create a new version with /VERSION. o You need CONTROL at both the source and destination directories to use the /PROTECTION qualifier. If you are using /VERSION, you need CONTROL at the highest existing version of the object in the destination directory in order to copy the access control list of the object in the source directory. 2 qualifiers /AUDIT Syntax: /AUDIT [= (quoted-string [, quoted-string]...)] /AUDIT=file-specification /NOAUDIT Use /AUDIT to create history list entries auditing the copy in the history lists of both source and destination dictionary directories, subdictionaries, and objects. You can include explanatory text in history list entries in three ways: o By specifying the /AUDIT qualifier. If you include no quoted string or file-specification, DMU provides a default history list entry describing your operation. o By including quoted strings. Enclose each quoted string in double quotation marks, and enclose the series of strings in parentheses. The parentheses are optional if you specify only one quoted string. o By specifying a file whose contents are to be included in the history list entry. The file specification is a standard VMS file specification, and the default file type is .DAT. You can include no more than 64 input strings in a history list entry. DMU ignores any excess. With /NOAUDIT, no history list entries are created. The default is /NOAUDIT. /HISTORY Syntax /[NO]HISTORY Use /HISTORY to copy history lists. Use /NOHISTORY to exclude history lists from the information that is copied. When you use /NOHISTORY with /VERSION, the copied object receives the history list of the highest existing version of the object in the destination directory. The default is /NOHISTORY. /LOG Syntax: /LOG [= file-specification] /NOLOG Use /LOG to create a list of the given names of all of the dictionary directories, subdictionaries, and objects copied. The file specification is a standard VMS file specification naming the file into which the log is written. The default file type is .LOG. If you use /LOG without specifying a file, DMU writes the log to SYS$OUTPUT. With /NOLOG, no list is created. The default is /NOLOG. /PROTECTION Syntax: /[NO]PROTECTION Use /PROTECTION to copy access control lists. Use /NOPROTECTION to exclude access control lists from the information that is copied. If you use /NOPROTECTION with /VERSION, the object receives the access control list of the highest existing version of the object in the destination directory. The default is /NOPROTECTION. /STAGE Syntax: /[NO]STAGE Use /STAGE to withhold committing changes in the CDD until the entire copy is completed. Use /NOSTAGE to make changes in the CDD as each dictionary directory, subdictionary, or object is copied. Using /STAGE assures that no changes remain in the dictionary if a command is interrupted. However, with /STAGE, execution time increases exponentially with the number of directories, subdictionaries, and objects copied. With /NOSTAGE, execution time increases linearly with the number of directories, subdictionaries, or objects copied. However, if you interrupt an unstaged COPY command, some of the changes remain in the dictionary. The default is /NOSTAGE. /VERSION Syntax: /[NO]VERSION Use /VERSION to copy objects to a directory where an object with the same name already exists. The new objects in the destination directory have the same version numbers as the original objects from which they were copied, regardless of whether you specified version numbers in the source path names. Unless there is an object in the destination directory with the same name as an object you are copying, there is no need to use /VERSION. Use /NOVERSION to guarantee that the destination directory does not already contain an object with the same name as the object you are copying. /NOVERSION is the default. The results of using the /VERSION qualifier vary depending on the existing children of the target directory. o COPY/VERSION copies an object to a destination directory if the destination directory does not already contain an object with the same name and same version number as the source object. In this case, DMU copies the specified version of the object in the source path name to the destination directory. The new object has the same version number as the source object. o COPY/VERSION copies an object to a destination directory and issues an informational message if the destination directory already contains an object with the same name and a higher version number. For example, you specify TEST_REC;2 and the destination directory contains TEST_REC;3. In this case DMU creates the object with the same name and version number as the source object, then issues the informational message. o COPY/VERSION does not copy an object if the destination directory contains an object with the same name and version number as the source object. For example, you specify TEST_REC;2 and the destination directory already contains TEST_REC;2. By default, a new version of an object has the same access control list and history list as the highest existing version of the object in the destination directory. You can copy the access control list from the source by using the /PROTECTION qualifier with /VERSION. To copy the access control list, you must have CONTROL (C) privilege at the highest existing version of the object in the destination directory. You can copy the history list from the source by using /HISTORY with /VERSION.