Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Parameters

Command Qualifiers

Examples

/ALLOCATION

/BACKUP

/BEFORE

/BY_OWNER

/CONCATENATE

/CONFIRM

/CONTIGUOUS

/CREATED

/EXCLUDE

/EXPIRED

/EXTENSION

/LOG

/MODIFIED

/OVERLAY

/PROTECTION

/READ_CHECK

/REPLACE

/SINCE

/TRUNCATE

/VOLUME

/WRITE_CHECK

HELP COPY — VMS 5.0

  Creates a new file from  one  or  more  existing  files.   The  COPY
  command can:

  o  Copy an input file to an output file

  o  Concatenate two or more input files into a single output file

  o  Copy a group of input files to a group of output files

  Format:


    COPY  input-file-spec[,...] output-file-spec

Additional information available:

ParametersCommand QualifiersExamples

Parameters

 input-file-spec[,...]

  Specifies the names of one or more input files to be copied.  If you
  specify  more  than  one input file, you can separate the names with
  either commas or plus signs.

  You can use wildcard characters in the file specifications.

 output-file-spec

  Specifies the name of the output file into  which  the  input  files
  will be copied.

  You  must  specify  at  least  one  field   in   the   output   file
  specification.   If  the  device or directory is not specified, your
  current default device and directory are  used.   The  COPY  command
  replaces  any  other  missing  fields (file name, file type, version
  number)  with  the   corresponding   field   of   the   input   file
  specification.   If  you  specify  more  than  one  input file, COPY
  generally uses the fields from the first input file to determine any
  missing fields in the output file.

  The asterisk wildcard character can be used in  place  of  the  file
  name,  file  type, and/or version number.  The COPY command uses the
  corresponding field in the related input file  to  name  the  output
  file.   The  wildcard  character can also be used in the output file
  specification to have COPY create more than one  output  file.   For
  example:
       $ COPY A.A;1, B.B;1 *.C

  This COPY command creates the files A.C;1 and B.C;1 in  the  current
  default directory.

  Full use of wildcard characters is allowed for  directories  in  the
  output file specification.

Command Qualifiers

Additional information available:

/ALLOCATION/BACKUP/BEFORE/BY_OWNER/CONCATENATE
/CONFIRM/CONTIGUOUS/CREATED/EXCLUDE/EXPIRED/EXTENSION
/LOG/MODIFIED/OVERLAY/PROTECTION/READ_CHECK
/REPLACE/SINCE/TRUNCATE/VOLUME/WRITE_CHECK

/ALLOCATION

 /ALLOCATION=n

 Output-file-spec qualifier.

  Forces the initial allocation of the output file to  the  number  of
  512-byte  blocks  specified  by  n.   If  not specified, the initial
  allocation of the output file is determined by the size of the input
  file being copied.

/BACKUP

 /BACKUP

 Selects files according to the dates of  their  most  recent  backup.
  This qualifier is relevant only when used with the /BEFORE or /SINCE
  qualifier.  Use  of  the  /BACKUP  qualifier  is  incompatible  with
  /CREATED, /EXPIRED, and /MODIFIED.  /CREATED is the default.

/BEFORE

 /BEFORE[=time]

 Selects only those files that are dated before the specified time.

  You can specify either an absolute time or a combination of absolute
  and delta times.   See the VMS  DCL  Concepts  Manual  for  complete
  information  on  specifying  time  values.   You  can  also use  the
  keywords  TODAY,  TOMORROW, and YESTERDAY.  If no time is specified,
  TODAY is assumed.

/BY_OWNER

 /BY_OWNER[=uic]

 Selects one or more files only if  their  owner  user  identification
  code (UIC) matches the specified owner UIC.

  Specify the UIC using standard UIC format as  described  in  the VMS
  DCL Concepts Manual.

  If the /BY_OWNER qualifier is specified without a UIC,  the  UIC  of
  the current process is assumed.

/CONCATENATE

 /CONCATENATE (default)
 /NOCONCATENATE

  Controls whether a single output file is to be created from all  the
  input  files  when  a wildcard character is used in any field of the
  output file specification.

  By default, a wildcard character  in  an  input  file  specification
  results  in  a single output file consisting of the concatenation of
  all input files matching the file specification.

  When you concatenate files from Files-11 Structure  Level  2  disks,
  the  COPY  command concatenates the files in alphanumeric order.  If
  you specify a wildcard character in the file  version  field,  files
  are  copied  in  descending  order  by  version  number.   When  you
  concatenate files from Files-11 Structure Level 1  disks,  the  COPY
  command concatenates the files in random order.

/CONFIRM

 /CONFIRM
 /NOCONFIRM (default)

  Controls whether a request is issued  before  each  individual  COPY
  operation  to confirm that the operation should be performed on that
  file.

  When the system  issues  the  prompt,  you  can  issue  any  of  the
  following responses:

       YES    NO       QUIT

       TRUE   FALSE    <CTRL/Z>

       1      0        ALL

              <RET>

  You can use any combination of upper- and lowercase letters for word
  responses.  Word responses can be abbreviated to one or more letters
  (for example, T, TR, or TRU for TRUE).  Affirmative answers are YES,
  TRUE, and 1.  Negative answers are NO, FALSE, 0, and <RET>.  QUIT or
  CTRL/Z indicates that you want to stop  processing  the  command  at
  that  point.   When  you  respond with ALL, the command continues to
  process, but no further prompts are given.  If you type  a  response
  other than one of those in the list, the prompt will be reissued.

/CONTIGUOUS

 /CONTIGUOUS
 /NOCONTIGUOUS

  Output-file-spec qualifier.

  Indicates whether the output file is  to  be  contiguous,  that  is,
  whether the file must occupy consecutive physical disk blocks.  This
  qualifier can be applied only to an output file.

  By default, the COPY command creates an  output  file  in  the  same
  format  as  the  corresponding  input  file.   If  an  input file is
  contiguous, the COPY command attempts to create a contiguous  output
  file,  but it does not report an error if there is not enough space.
  If you copy multiple input files of different  formats,  the  output
  file  may  or  may  not  be contiguous.  You can use the /CONTIGUOUS
  qualifier to ensure that files are copied contiguously.

  The /CONTIGUOUS qualifier has no effect when you copy  files  to  or
  from  tapes,  because  the  size  of  the  file  on  tape  cannot be
  determined until after it is copied to the disk.  If you copy a file
  from a tape and want the file to be contiguous, use the COPY command
  twice:  once to copy the file from the tape, and a  second  time  to
  create a contiguous file.

/CREATED

 /CREATED (default)

 Selects files based on their dates of creation.   This  qualifier  is
  relevant  only  when used with the /BEFORE or /SINCE qualifier.  Use
  of the /CREATED qualifier is incompatible  with  /BACKUP,  /EXPIRED,
  and /MODIFIED.

/EXCLUDE

 /EXCLUDE=(file-spec[,...])

 Any files that match the listed file specifications are excluded from
  the  COPY operation.  If you specify only one file, you can omit the
  parentheses.

  Wildcard characters are supported for file specifications.  However,
  you  cannot  use  relative  version  numbers  to  exclude a specific
  version.   The  file   specification   can   contain   a   directory
  specification, but not a device specification.

/EXPIRED

 /EXPIRED

 Selects files according to the dates on which they will expire.  This
  qualifier  is  relevant  only  when  used with the /BEFORE or /SINCE
  qualifier.  Use of  the  /EXPIRED  qualifier  is  incompatible  with
  /BACKUP, /CREATED, and /MODIFIED.  /CREATED is the default.

/EXTENSION

 /EXTENSION=n

 Output-file-spec qualifier.

  Specifies the number of blocks to be added to the output  file  each
  time  the  file  is extended.  If you do not specify /EXTENSION, the
  default extension attribute of the output file is determined by  the
  extension attribute of the corresponding input file.

/LOG

 /LOG
 /NOLOG (default)

  Controls whether the COPY command displays the  file  specifications
  of each file copied.

  When you use the /LOG  qualifier,  the  COPY  command  displays  the
  following  for  each copy operation:  (1) the file specifications of
  the input and output files, (2) the number of blocks or  the  number
  of  records  copied  (depending  on  whether the file is copied on a
  block-by-block or record-by-record basis), and (3) the total  number
  of new files created.

/MODIFIED

 /MODIFIED

 Selects files  according  to  the  dates  on  which  they  were  last
  modified.   This  qualifier  is  relevant  only  when  used with the
  /BEFORE or /SINCE qualifier.  Use  of  the  /MODIFIED  qualifier  is
  incompatible  with /BACKUP, /CREATED, and /EXPIRED.  /CREATED is the
  default.

/OVERLAY

 /OVERLAY
 /NOOVERLAY (default)

  Output-file-spec qualifier.

  Requests that data in the input file  be  copied  into  an  existing
  output file, overlaying the existing data.  The physical location of
  the file on disk does not change.

  The /OVERLAY qualifier is ignored if the output file is written to a
  non-file-structured device.

/PROTECTION

 /PROTECTION=(code)

 Output-file-spec qualifier.

  Defines the protection to be applied to the output file.

  Specify the protection code using the rules given  in  the  VMS  DCL
  Concepts  Manual.   Any  protection  field you specify overrides any
  currently existing protection field.

/READ_CHECK

 /READ_CHECK
 /NOREAD_CHECK (default)

  Input-file-spec qualifier.

  Requests the COPY command to read each record in the specified input
  files twice to verify that all records were correctly read.

/REPLACE

 /REPLACE
 /NOREPLACE (default)

  Output-file-spec qualifier.

  Requests  that,  if  a  file  already  exists  with  the  same  file
  specification as that entered for the output file, the existing file
  is to be deleted.  The COPY command  allocates  new  space  for  the
  output  file.   In general, when you use the /REPLACE qualifier, you
  will want to include version numbers with the file specifications.

  By default, the COPY command creates a new version of a  file  if  a
  file  with  that  specification  already  exists,  incrementing  the
  version number.   Under  /NOREPLACE,  when  a  conflict  in  version
  numbers occurs, an error is signaled.

/SINCE

 /SINCE[=time]

 Selects only those files that are dated after the specified time.

  You can specify either an absolute time or a combination of absolute
  and delta times.  See the  VMS  DCL  Concepts  Manual  for  complete
  information on  specifying  time  values.   You  can  also  use  the
  keywords  TODAY,  TOMORROW, and YESTERDAY.  If no time is specified,
  TODAY is assumed.

/TRUNCATE

 /TRUNCATE
 /NOTRUNCATE (default)

  Output-file-spec qualifier.

  Controls whether the COPY command truncates an output  file  at  the
  end-of-file  when copying it.  By default, the COPY command uses the
  allocation of the input file to determine the  size  of  the  output
  file.

/VOLUME

 /VOLUME=n

 Output-file-spec qualifier.

  Requests that the COPY command place the entire output file  on  the
  specified relative volume number of a multivolume set.

  If the /VOLUME qualifier is not specified, the file is placed in  an
  arbitrary position within the multivolume set.

/WRITE_CHECK

 /WRITE_CHECK
 /NOWRITE_CHECK (default)

  Output-file-spec qualifier.

  Requests the COPY command to read each record  in  the  output  file
  after  it  was  written  to  verify that the record was successfully
  copied and that the file can subsequently be read without error.

Examples

  1.   $ COPY TEST.DAT NEWTEST.DAT

  The COPY command copies the contents of the file TEST.DAT  from  the
  default  disk  and directory to a file named NEWTEST.DAT on the same
  disk and directory.  If a file named NEWTEST.DAT already exists, the
  COPY command creates a new version of it.

  2. $ COPY ALPHA.TXT TMP
       $ COPY ALPHA.TXT .TMP

  The first COPY command copies the file ALPHA.TXT into a  file  named
  TMP.TXT.   The  COPY command uses the file type of the input file to
  complete the file specification for the  output  file.   The  second
  COPY  command creates a file named ALPHA.TMP.  The COPY command uses
  the file name of the input file to name the output file.

  3. $ COPY *.* PRTLND::*.*

  The COPY command copies all files within the user directory  at  the
  local  node  to the remote node PRTLND.  The new files will have the
  same names as the input file.  You must have W (write) access to the
  default directory on remote node PRTLND for the command to work.

  4. $ COPY BOSTON::DISK2:TEST.DAT;5
       _To: DALLAS"SAM
       SECRET"::DISK0:[MODEL.TEST]TEST.DAT/ALLOCATION=50

  The COPY command copies the file TEST.DAT;5 on the device  DISK2  at
  node BOSTON to a new file named TEST.DAT at remote node DALLAS.  The
  /ALLOCATE qualifier initially allocates 50 blocks for the  new  file
  TEST.DAT  at  node  DALLAS.  The access control string SAM SECRET is
  used to access the remote directory.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026