Chapter Contents |
Previous |
Next |
TAPECOPY |
OS/390 specifics: | all |
Syntax |
PROC TAPECOPY options ;
|
Details |
PROC TAPECOPY always begins writing at the beginning of the output tape volume; any files that previously existed on the output tape are destroyed.
Note: PROC TAPECOPY
copies to a single output tape volume.
The TAPECOPY procedure can copy either standard labeled or nonlabeled tapes or cartridges. You can specify, within limits, whether the output tape is standard labeled (SL) or nonlabeled (NL). You cannot create an SL tape using an NL input tape because TAPECOPY cannot manufacture tape labels. Also, if LABEL=(,SL) was specified in a DD statement for an output tape volume, you cannot change that tape into a nonlabeled tape. PROC TAPECOPY does allow you to write over an existing volume label on a standard labeled tape if you specify LABEL=(,BLP) in the DD statement. (The BLP value indicates bypass label processing.)
The JCL DD statement parameter LABEL=(,BLP) must be authorized specifically by each computing installation. If your installation allows the BLP specification, then ANSI-labeled, nonstandard labeled, and standard user-labeled tapes can be treated as nonlabeled tape volumes. If the BLP specification is not authorized at your installation, then LABEL=(,BLP) is treated as LABEL=(,NL). PROC TAPECOPY will work as you expect if your tape is in fact nonlabeled; otherwise, the operating environment does not allow TAPECOPY to use the tape, thus preserving the label.
Throughout this description, references to specifying LABEL=(,BLP) assume that LABEL=(,BLP) is a valid specification at your installation.
VOL=SER gives the volume serial of the first input tape. You can omit VOL=SER if the UNIT parameter specifies deferred mounting--for example, UNIT=(tape,,DEFER). If you specify deferred mounting, remember to use the INVOL= option in the PROC TAPECOPY statement or in an INVOL statement to specify the volume serial of the input tape. For details , see the information on the INVOL= option or INVOL Statement.
For a nonlabeled input tape, you must specify either LABEL=(,NL) or LABEL=(,BLP) in the DD statement. If you are unsure whether the input tape volume is labeled or nonlabeled, specify LABEL=(,BLP) in the input tape DD statement, if your installation allows it.
For a standard labeled input tape at an installation
that does not allow LABEL=(,BLP), specify LABEL=(,SL) and the DSN parameter,
giving the DSNAME of the first data set on the tape.
VOL=SER gives the volume serial of the output tape. You can omit VOL=SER if the UNIT parameter specifies deferred mounting--for example, UNIT=(tape,,DEFER). If you specify deferred mounting, use the OUTVOL= option in the PROC TAPECOPY statement to specify the volume serial of the output tape. For details, see the information on the OUTVOL= option below.
You should usually specify DISP=(NEW,KEEP) for the output
tape in the DD statement. At some installations it may be necessary to specify
DISP=(OLD,KEEP) along with the DSN parameter, giving the DSNAME of the first
data set on the tape volume. The LABEL parameter should give the tape's label
type as it is before the TAPECOPY procedure is executed, regardless of its
label type after the copying operation.
The TAPECOPY procedure writes to the SAS log a listing of the input and output tape characteristics plus a summary of the files that were copied.
PROC TAPECOPY Statement |
PROC TAPECOPY options; |
Both of these conditions must be true because the PROC TAPECOPY statement LABEL= option specifies whether the output tape is standard labeled or nonlabeled after the copy operation. The output tape volume's DD statement LABEL= parameter specifies what the output tape's label status is before the copy operation.
If you specify COPYVOLSER and these conditions are not true, PROC TAPECOPY stops processing.
Valid density values follow:
Tape Density Value | Tape Volume Type | |
---|---|---|
DEN=2 | 800 bpi | |
DEN=800 | ||
DEN=3 | 1600 bpi | |
DEN=1600 | ||
DEN=4 | 6250 bpi | |
DEN=6250 |
Specify the INVOL= option only if you are using deferred mounting.
Note: Be careful not to confuse the LABEL= option in the PROC TAPECOPY
statement with the DD statement parameter LABEL=(,specification).
The PROC TAPECOPY statement LABEL= option specifies whether the output tape
is standard labeled or nonlabeled after the copy operation. The
output tape volume's DD statement LABEL= parameter specifies what the output
tape's label status is before the copy operation.
The DD statement for nonlabeled output tapes must specify either LABEL=(,NL) or LABEL=(,BLP). If the output tape has an existing label (before the copy operation) and the output tape is to be nonlabeled (after the copy operation), then the DD statement must specify LABEL=(,BLP).
The default LABEL= option value is NL when multiple input volumes are used and when the DD statements for any of them specify LABEL=(,NL). If there are multiple input tapes and LABEL=(,NL) is not specified for any of them, and if the first input tape volume is actually standard labeled, then the default LABEL= option value is SL. This is true even if the DD statement specifies LABEL=(,BLP) for the first tape; in this case, PROC TAPECOPY reads the tape volume's first record to determine the actual label type.
Specify the OUTVOL= option only if you are using deferred mounting.
INVOL Statement |
INVOL options ; |
The following options can appear in the INVOL statement. The options are listed alphabetically.
You typically use this option when one of the following conditions is true:
Note: If you do not specify NL or SL in the
INVOL statement, the actual input tape label type determines whether PROC
TAPECOPY treats the tape as nonlabeled or standard labeled, even when LABEL=(,BLP)
is specified in the DD statement.
FILES Statement |
FILES file-numbers; |
If you are using only one input tape, the FILES statement(s)
can directly follow the PROC TAPECOPY statement. When you use several input
tape volumes, follow each INVOL statement with the associated FILES statement
or statements.
File numbers in a FILES statement can be specified in any order. For example, you might want to copy file 5 and then file 2 and then file 1, as in the following example:
proc tapecopy; files 5 2; files 1; run;
You can specify a range of files by putting a dash between two file numbers, 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 (end of volume) can be used as the last file in a range. PROC TAPECOPY copies all files on the input tape until the end of the volume (in most cases, a double tapemark). On a nonlabeled tape, you can copy files from the input tape beyond the double tapemark by specifying the physical file number, counting tapemarks as usual. If another double tapemark exists on the input tape volume, you can then specify EOV in another range.
Examples |
//jobname JOB account,name // EXEC SAS //VOLIN DD UNIT=TAPE,DISP=OLD, // VOL=SER=XXXXXX,LABEL=(,SL), // DSN=first-dsname-on-tape //VOLOUT DD UNIT=TAPE,DISP=(,KEEP), // VOL=SER=YYYYYY,LABEL=(,SL) //SYSIN DD * proc tapecopy; run; /* //
After PROC TAPECOPY executes, the output tape volume is labeled YYYYYY.
If LABEL=(,BLP) had been specified in the input tape DD statement (VOLIN), then it would not have been necessary to use the DSN= option. Because some installations do not permit the BLP label type specification, and because no volume label checking is performed when it is specified, it is recommended that you specify (or allow to default) LABEL=(,SL).
The specification of LABEL=(,SL) in the output tape
DD statement (VOLOUT) causes the operating environment to check the volume
label when a tape volume is mounted on the tape drive. The operating environment
ensures that a tape with volume serial YYYYYY is mounted. However, if the
tape with external volume label YYYYYY were, in fact, internally labeled something
other than YYYYYY, PROC TAPECOPY would fail. In this case, you would have
to specify LABEL=(,BLP) or else give the actual internal volume serial in
the output tape DD statement. If the output tape is not labeled internally,
you can specify LABEL=(,NL) or LABEL=(,BLP).
//jobname JOB account,name // EXEC SAS //VOLIN DD UNIT=TAPE,DISP=OLD,VOL=SER=TAPEIN, // LABEL=(,BLP) //VOLOUT DD UNIT=TAPE,DISP=(,KEEP),VOL=SER=FCSTP1, // LABEL=(,NL) //SYSIN DD * proc tapecopy label=nl; run; /* //
//jobname JOB account,name // EXEC SAS //INTAPE DD UNIT=TAPE,DISP=OLD,VOL=SER=QDR123, // LABEL=(,NL) //OUTTAPE DD UNIT=2927-3,DISP=(,KEEP), // VOL=SER=SLXATK,LABEL=(,NL) //SYSIN DD * proc tapecopy indd=intape outdd=outtape den=1600; run; /* //
//jobname JOB account,name // EXEC SAS //TAPI1 DD DISP=SHR,UNIT=TAPE, // VOL=SER=U02746,LABEL=(,SL), // DSN=first-file-dsname //TAPI2 DD UNIT=(TAPE,,DEFER) //OUTDDN DD DISP=(,KEEP),UNIT=TAPE,VOL=SER=MINI01, // LABEL=(,NL) //SYSIN DD * proc tapecopy outdd=outddn indd=tapi1 copyvolser; files 3 2 1; invol indd=tapi2 invol=t13794 dsn='first-dsname-on-this-tape '; file 3; invol indd=tapi1; files 5-7 4; invol indd=tapi2; files 2 4 1; run; /* //
The next job copies several files from several input tape volumes to one output tape volume:
//REARRNGE JOB account,name // EXEC SAS //DEN2IN DD UNIT=(2927-4,,DEFER),LABEL=(,BLP) //DEN3IN DD UNIT=(2927-3,,DEFER),LABEL=(,SL) //TAPE1 DD UNIT=TAPE,DISP=SHR,VOL=SER=XR8475, // LABEL=(,BLP) //TAPE2 DD UNIT=TAPE,DISP=OLD,VOL=SER=BKT023, // DSN=first-file-dsname //OUTPUT DD UNIT=(3400-5,,DEFER),DISP=(,KEEP) //SYSIN DD * proc tapecopy label=sl den=6250 nolist outdd=output outvol=histpe; invol indd=den2in invol=ptftp0; files 2-4 8-eov 7 6; invol indd=tape1; files 5 7 9-eov; invol indd=tape2; files 4 5 1; invol indd=den3in invol=s03768 dsn='xrt.bkt120.g0081v00'; files 1-6 22-34; invol invol=so3760 dsn='t.bkt120.g0023v00'; files 4 5 6 9; invol indd=tape2; files 7-eov; run; /* //
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.