Chapter Contents |
Previous |
Next |
TAPECOPY |
CMS specifics: | all |
Syntax |
PROC TAPECOPY <options>;
|
Details |
The TAPECOPY procedure copies an entire tape volume or files from one or more tape volumes to a single output tape volume. Use the TAPECOPY procedure to copy standard labeled or nonlabeled 9-track tapes and 18-track tape cartridges under CMS. PROC TAPECOPY always begins writing at the beginning of the output tape volume.
PROC TAPECOPY Statement |
Syntax |
PROC TAPECOPY <options>; |
The PROC TAPECOPY statement accepts the following options.
Valid density values are given by the following table.
Tape Density Value | Tape Volume Type | |
---|---|---|
DEN=2 | 800 bpi | |
DEN=800 | ||
DEN=3 | 1600 bpi | |
DEN=1600 | ||
DEN=4 | 6250 bpi | |
DEN=6250 | ||
DEN=5 | 38K bpi | |
DEN=38K |
Note: Do not specify SL if you intend
to copy any nonlabeled tapes.
If SL is specified, the output tape is SL; if NL is specified, the output tape is NL. When BLP is specified, all files are treated as physical files and the distinction between data files and label files is irrelevant; therefore, the output tape has the label status of the input tape.
In the following example an unlabeled output tape is created from a standard labeled input tape using PROC TAPECOPY:
proc tapecopy label=nl nolist; run;
After PROC TAPECOPY has executed, the output tape volume is a nonlabeled tape. In this example, specifying LABEL=NL was necessary. If it were not specified, the default of LABEL=BLP would have been used, and all files, including data and labels, would have been copied.
Note: Do not specify
both the INDD= and TAP1 options.
A corresponding FILENAME statement or CMS FILEDEF command is unnecessary if the TAPn option is used. If the OUTDD= option has not been specified and there is no FILEDEF for VOLOUT, the TAPn value defaults to TAP2.
Note: Do not specify
both the OUTDD= and TAPn options.
Some CMS sites do not have CMS tape mount commands but do allow you to mount tapes by contacting the computer operator. If your installation does not support CMS tape mount commands, you can still use PROC TAPECOPY, but you cannot specify deferred tape mounting for input tapes. If your installation has CMS tape mount commands, you can specify deferred tape mounting with an option in the INVOL statement.
Note: PROC TAPECOPY supports
deferred mounting of input tapes only.
If
you do not specify any options in the PROC TAPECOPY statement (and there are
no FILEDEF commands for the VOLIN and VOLOUT options), PROC TAPECOPY defaults
to TAP1 for input and TAP2 for output. The output tape volume is labeled
with the same label as the input tape. All files, including labels, are copied
because LABEL=BLP is assumed.
filename intape tape 'tap1'; filename outtape tape 'tap2'; proc tapecopy indd=intape outdd=outtape den=1600 nolist; run;
Printed Output |
The TAPECOPY procedure prints a listing to the SAS log of the input and output tape characteristics and a summary of the files copied.
INVOL Statement |
Syntax |
INVOL <options> </'CMS-mount-command'>; |
If you want to use deferred mounting for an input tape, you must use an INVOL statement with the /'CMS-mount-command' option.
Note: You cannot use deferred mounting for an
output tape.
The following options can appear in the INVOL statement:
Note: Be sure that you know the contents of any tape for which you
specify BLP in an INVOL statement to avoid copying labeled and nonlabeled
tapes to the same output tape.
The mount request is executed via the standard CMS function call (SVC 204). If the return code is not zero (for example, if PROC TAPECOPY cannot find the specified mount command), SAS prints a message on the SAS log and the procedure stops processing. Some mount commands require that the tape drive be detached before the mount is issued. If this is a requirement, then you must specify DETACH in the INVOL statement.
Note: At installations that do not have any mount commands, this option is invalid;
therefore, you cannot use deferred mounting.
If you specify LABEL=SL in the PROC TAPECOPY statement (for the output tape), do not specify NL on a subsequent INVOL statement. In other words, do not copy labeled and nonlabeled tapes onto the same output tape unless the labeled tapes are to be treated as nonlabeled.
The default value is the TAPn in effect from the PROC TAPECOPY statement or previous INVOL statement.
Do not use both the INDD= and TAPn options.
Copying Multiple Files from Multiple Tapes |
proc tapecopy tap1 nolist tap2 copyvolser label=sl; invol sl /'mount t13794 on 181 noring'; file 3; invol sl /'mount txxxxx on 181 noring'; files 4 5-7; invol sl /'mount tyyyyy on 181 noring'; files 2 4 1 9-eov; run;
An INVOL statement is used for each input tape to specify that the tapes are standard labeled and to provide the deferred tape mount command. Each tape must be standard labeled, or PROC TAPECOPY fails.
FILES Statement |
Syntax |
FILES file-numbers; |
Input Tape | LABEL= Value from PROC TAPECOPY Statement | Output Tape | File Numbers |
SL | NL | NL | logical |
SL | SL | SL | logical |
NL | NL | NL | physical |
NL | BLP | NL | physical |
SL | BLP | SL | physical |
Note: A physical file is defined as the information
on a tape between two tape marks. A logical file actually consists of three
physical files; the first contains a header label, the second contains the
data, and the third contains a trailer label. The term logical file in this
context implies a standard labeled tape.
When you select specific files from the first input
tape, the FILES statement(s) directly follows the PROC TAPECOPY statement.
When you use several input tape volumes, follow each INVOL statement with
its associated FILES statement(s).
File numbers in a FILES statement can be specified in any order. If, for example, you want to copy file 5 and follow it by file 2 and then file 1, you can specify the following:
proc tapecopy; files 5 2; files 1; run;
Or, you can specify the following:
proc tapecopy; files 5 2 1; run;
You can specify a range of files by putting a dash between the two files, as in the following example:
proc tapecopy; files 1-7; run;
In a range, the second number must be greater than the first. The keyword EOV can be used as the second file in a range. PROC TAPECOPY copies all files on the input tape until the end of the volume is reached, which is, in most cases, indicated by a double tape mark.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.