── ADD ─┬──────────────────────────────────────────┬───────────────────► │ ┌◄─────────────────────────────────────┐ │ └─┴─┬─ & ───┬─┬─ /1\ ── BECOMEOWNER ───┬─┴─┘ └─ AND ─┘ ├─ /1\ ─┬─ CATALOG ──────┤ │ └─ BACKUP ───────┤ ├─ /1\ ─┬─ COMPARE ──────┤ │ └─ VERIFY ───────┤ ├─ /1\ ─┬─ DSONERROR ────┤ │ └─ WAITONERROR ──┤ ├─ /1\ ── REPORT ────────┤ └─ /1\ ── SKIPEXCLUSIVE ─┘ ►─┬───────────────────────────────────────────┬────────────────────────► │ ┌◄────────────── , ─────────────┐ │ └─ [ ─┴─┬─ /1\ ── FROMSTART ────────┬─┴─ ] ─┘ └─ /1\ ──<transfer service>─┘ ┌◄─────── , ───────┐ ►─┴─ <copy request> ─┴─┬─────────────────────────────┬─────────────────► └─ [ ──<task identifier>── ] ─┘ ►─┬──────────────────────────────────────┬─────────────────────────────┤ │ ┌◄─────────────────────────────────┐ │ └─┴─ ; ──<task attribute assignment>─┴─┘
Explanation
The ADD statement is similar to the COPY statement. It copies files between disks and tapes. It 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.
The ADD statement has the following effects which depend on whether a disk or tape destination is specified:
-
For a disk destination, the ADD statement copies only those files that are not already resident on the specified disk destination.
-
For a tape destination, it is equivalent to a COPY statement with a tape destination. If there were any files on the destination tape, they will be overwritten. The ADD statement will copy all the available requested files to the destination tape.
For a detailed explanation of the ADD statement syntax, refer to the COPY or ADD Statement.
Example
The following example of the ADD statement copies files under the directory Z/= from tape T to disk R and to DISK. Any files already resident on the destination volumes are not copied. Different files might be copied to R and DISK, depending on what is already resident on each destination volume before the ADD is executed.
ADD Z/= FROM T(KIND=TAPE) TO R(KIND=DISK), TO DISK;