TAPELABEL Procedure: z/OS

Writes the label information of an IBM standard-labeled tape volume to the SAS procedure output file.
z/OS specifics: All

Syntax

PROC TAPELABEL <options > ;

Details

Overview of PROC TAPELABEL

The procedure writes information from the tape label, including the data set name, DCB information, and data set history, to the SAS procedure output file.
Each tape volume must have a ddname allocated for it before that volume can be read by the TAPELABEL procedure. Multiple tape volumes can be read in one PROC TAPELABEL statement, using a list of ddnames in the DDNAME= option, as shown below. At some installations, you might need to specify the data set name of the first file on the tape volume as the first entry in your list of ddnames. This specification is necessary if you cannot use LABEL=(,BLP), which is restricted at many sites.

PROC TAPELABEL Statement

PROC TAPELABEL <options > ;
The following options can be specified in the PROC TAPELABEL statement:
DCBDEVT=128
enables PROC TAPELABEL to process Fujitsu F6470 tape cartridges.
DDNAME=(ddname-1...ddname-n)
specifies the ddname of the tape volume that you want to process. More than one ddname can be specified, with blanks spaces delimiting the list. If you specify only one ddname, you can omit the parentheses.
If DDNAME= is omitted, the default ddname is TAPE.
DUMP
sends to output the first 80 bytes in the first 10 blocks of each data set on the tape.
NOTRAP813
tells the TAPELABEL procedure not to trap 813-04 abends. When you use LABEL=(,SL) to access an IBM standard labeled tape, this option prevents you from reading the tape unless you specify the data set name of the first file on the tape volume.
PAGE
begins the output for each tape volume on a new page.

Output

For each file on a tape volume, TAPELABEL generates the following information:
  • FILE NUMBER, the file sequence number
  • DSNAME, the data set name
  • RECFM, the record format
  • LRECL, the logical record length
  • BLKSIZE, the block size
  • BLOCK COUNT, the number of blocks in the file (from the trailer label)
  • EST FEET, the estimated length of the file in feet (assumes all blocks=BLKSIZE)
  • CREATED, the file creation date
  • EXPIRES, the file expiration date
  • CREATED BY JOB NAME STEPNAME, the job and step names of the job that created the file
  • TRTCH, the track recording technique
  • DEN, the file recording density code
  • PSWD, the file protection indicator
  • UHL, the number of user header labels
  • UTL, the number of user trailer labels.
TAPELABEL also lists the sum of the estimated file lengths.
Note: On an IBM standard tape label, only 17 characters are available for the data set name. If a longer name is specified in the JCL when the data set is created, only the rightmost 17 characters are used. PROC TAPELABEL displays what is stored in the tape's header label. Some tape management systems catalog data sets by the full name specified in the JCL and therefore require you to specify the full name when you access the data set.

Example: Generating Tape Label Information

The following job generates the label information for all files on the MVSV9 tape volume allocated to the ddname OURTAPE:
//jobname JOB acct,name
/*JOBPARM FETCH
//TLABEL   EXEC SAS
//OURTAPE  DD   UNIT=TAPE,DISP=OLD,VOL=SER=MVSV9
//SYSIN DD *
   proc tapelabel ddname=ourtape;
   run;
/*
//
The following output displays the results.
Output from the TAPELABEL Procedure
                                                            The SAS System
                                                   TAPE LIST FOR DDNAME -  OURTAPE
 CONTENTS OF TAPE VOLUME -  OS390T                                                                     OWNER -
  FILE                                             BLOCK   EST       CUM                         CREATED BY
  NUMBER DSNAME          RECFM  LRECL  BLKSIZE  COUNT   FEET   FEET CREATED   EXPIRES  JOB NAME STEPNAME TRTCH DEN PSWD UHL UTL
    1  SAS.SASROOT        FB     80     6160    175      3.6    3.6 12MAR2005 0000000  E70S701 /GO              5   NO   0   0
    2  SAS.V186.@P@BA$H   FB   6144     6144     77      1.6    5.2 12MAR2005 0000000  E70S701 /GO              5   NO   0   0
    3  SAS.V186.EMO1CLR   U       0     6164    633     12.9   18.0 12MAR2005 0000000  E70S701 /GO              5   NO   0   0