COPY or ADD Statement

<copy or add statement>

──┬─ COPY ─┬─┬──────────────────────────────────────────┬──────────────►
  └─ ADD ──┘ │ ┌◄─────────────────────────────────────┐ │
             └─┴─┬─ & ───┬─┬─ /1\ ── BECOMEOWNER ───┬─┴─┘
                 └─ AND ─┘ ├─ /1\ ─┬─ CATALOG ──────┤
                           │       └─ BACKUP ───────┤
                           ├─ /1\ ─┬─ COMPARE ──────┤
                           │       └─ VERIFY ───────┤
                           ├─ /1\ ─┬─ DSONERROR ────┤
                           │       └─ WAITONERROR ──┤
                           ├─ /1\ ── PROPAGATE ─────┤
                           ├─ /1\ ── REMOVE ────────┤
                           ├─ /1\ ── REPORT ────────┤
                           ├─ /1\ ── SELECT ────────┤
                           ├─ /1\ ── SKIPEXCLUSIVE ─┤
                           └─ /1\ ── USEPATH ───────┘
  ┌◄────── , ──────┐
►─┴─<copy request>─┴─┬─────────────────────────────┬───────────────────►
                     └─ [ ──<task identifier>── ] ─┘
►─┬───────────────────────────┬────────────────────────────────────────┤
  └─<copy task equation list>─┘

<copy request>

    ┌◄───── , ────┐
──┬─┴─<copy file>─┴──────────────────────────────┬─────────────────────►
  │ ┌◄──────── , ───────┐                        │
  └─┴─<copy from group>─┴─┬──────────────────────┤
                          │ ┌◄─────────────────┐ │
                          └─┴─ , ──<copy file>─┴─┘
►─┬────────────────────────────────────────┬───────────────────────────┤
  │ ┌◄──────────────── , ────────────────┐ │
  └─┴─ /47\ ── TO ──<destination volume>─┴─┘

<copy file>

──┬─<long file name>─┬──────────┬─┬───────────────────────────┬────────┤
  │                  └─<origin>─┘ ├─ AS ───┬─<long file name>─┤
  │                               └─ ONTO ─┘                  │
  ├─<long dir name>─┬──────────┬─┬────────────────────────────┤
  │                 └─<origin>─┘ ├─ AS ───┬─<long dir name>───┤
  │                              └─ ONTO ─┘                   │
  └─<tape file number>──┬─────────────────────────────────────┤
                        ├─ AS ───┬─<long file name>───────────┘
                        └─ ONTO ─┘

<copy from group>

  ┌◄───── , ────┐
──┴─<copy file>─┴─ FROM ──<source volume>──────────────────────────────┤

<origin>

── ORIGIN ──<family name>──────────────────────────────────────────────┤

<tape file number>

── # ──<integer constant>──────────────────────────────────────────────┤

<source volume>

──<volume name>─┬────────────────────────────────┬─────────────────────┤
                └─<source volume attribute list>─┘

<destination volume>

── <volume name> ─┬───────────────────────────────────────┬────────────┤
                  └─ <destination volume attribute list> ─┘

Explanation

The following text describes the various components of the COPY or ADD statement. The information is organized according to its frequency of use and importance.

The COPY statement copies disk files from disks, tapes, or CD-ROMs to disks, tapes, or CD-ROMs. Some of the uses of the COPY statement are as follows:

  • Copying disk files onto tape or CD-ROM volumes or onto other disk families for safety backup. You can also selectively restore some or all of these files back to disk.

  • Copying disk files from one disk family to another.

  • Copying new software and disk files from tape or CD-ROM volumes received from Unisys and other installations to your disks, or copying files to tape or CD-ROM volumes for transfer to other installations.

  • Copying disk files from one host system to another within a network.

  • Copying CD-ROM images to write-once CD-ROMs.

Note: When copying to a CD-ROM, use the MULTIVOLUME attribute if more than one CD-ROM is required due to the amount of data. Refer to the MULTIVOLUME description in "Additional File Attributes" later in this subsection. The ADD statement, like the COPY statement, copies disk files between disks and tapes. The ADD statement has the following effects based on the specified destination:
  • For a disk destination, it copies only those files that are not already resident on the specified destination disk.

  • For a tape, it is equivalent to a COPY statement with a tape destination. If there were any files on the destination tape, they are overwritten. The ADD statement copies all the available requested files to the destination tape or CD-ROM volume.

Note: The ADD statement is not valid for CD-ROM volumes.

The ADD statement is particularly useful for adding a directory of files to a disk where some of the files are already resident and are to be preserved.

Refer to the MOVE statement for further information regarding moving files from one disk to another. Refer to the RESTORE statement for information regarding copying files from tape to disk. Refer to the REPLACE statement for information on replacing existing files to disk (but not for adding new files to disk).

For all of the following topics, unless otherwise mentioned, explanations about the COPY statement also apply to the ADD statement.

<copy from group>

Enables you to specify one or more source volumes. The source volume applies to the entire list of file names and directory names in the copy from group construct. It is best to group files to be copied from the same tape volume into one copy from group construct, because the tape is rewound for each copy from group construct operation if the same tape volume is specified more than once.

Using Task Variables

The task identifier construct is used to assign a task variable to a COPY statement. The TASKVALUE attribute can be tested to determine the success or failure of the copy. When the value of the TASKVALUE attribute is 0, all requests were satisfied, possibly with retries. When the value of the TASKVALUE attribute is not 0, one or more files were not copied. A nonzero value is also returned if the copy is discontinued, or in the case of an RSVP condition, if the failing action is not retried successfully.

Copy Task Equation List

<copy task equation list>

  ┌◄────────────────────────────────────┐
──┴─ ; ─┬─<task attribute assignment>─┬─┴──────────────────────────────┤
        └─<library equation>──────────┘

Task Attribute Assignment

Assigns task attributes to the library maintenance task. For a complete explanation of task attribute assignments, refer to Section 5 in this manual. For information on using the TASKSTRING task attribute when copying to CDs, see “Copying Files to CD-ROMs” later in this manual.

Library Equation

Changes the attributes of libraries. You can use library equation to change the REPORTER library used by library maintenance for the REPORT and SELECT options.

LIBRARY REPORTER (TITLE = <file title>, LIBACCESS = BYTITLE)

For a statement that specifies the REPORT option or the SELECT option, library maintenance normally calls the SL ARCHIVESUPPORT library. Library-equating REPORTER causes the library maintenance task to use the <file title> library instead of the standard SL ARCHIVESUPPORT library.