|
Entire document Available as PDF |
Table of Contents
TPUTIL is a comprehensive utility for the manipulation of magnetic tapes. It allows you to BACKUP, COPY, DUMP, MAP, and TRANSLATE a
tape. In addition, it includes support for the use of tape compaction with 3480 cartridge tapes. When you request the same tape in multiple commands, the tape is retained on the tape drive (when possible) to save the cost of a tape mount for each command.
The following summarizes the TPUTIL commands.
BACKUPMakes a backup copy of all or part of a tape volume onto a second tape.
COPYCopies
a tape volume, individual files, or a multi-volume tape data set. The COPY command allows you to change many tape data set characteristics during the copy operation, while BACKUP makes an exact duplicate of your tape.
DUMPAllows you to dump all or part of one or more tape files in character and/or hexadecimal format.
MAPRequests a report of the contents of a tape. For standard labeled tapes, this produces information from the labels. For non-labeled tapes, it lists the first 80 bytes of each file.
TRANSLATEModifies execution of
the DUMP command to convert the data from other character codes, such as ASCII.
OPTIONSAllows you to specify options that will be used
throughout the execution of your TPUTIL job.
All TPUTIL commands that print tape characteristic information (e.g., MAP) will indicate if a 3480 cartridge is compacted. This information is derived from the tape labels or parameters on the TPUTIL
commands.
Output volume label processing in the BACKUP and COPY commands will add the TRTCH value to the label and always rewrite the volume label when file #1 is written. This handles compacted
cartridges correctly and allows the density on tape reels to be changed by the BACKUP command.
Whatever TRTCH value is written to the volume label defines the TRTCH value for the entire tape. That is, if file #1 is written using compaction, all other files written to that tape must also be written
using compaction. You cannot mix files with different recording techniques on the same tape.
Also, suppose that you have a cartridge tape written before tape compaction became the default. Now, you copy it to another cartridge, beginning with file #1, but do not specify a TRTCH value. The TRTCH value
of your output tape will be COMP, the system default. If this is not what you wish, you must specify TRTCH=NOCOMP as described in the commands below.
You might wonder what will happen if you copy a TRTCH=COMP cartridge tape to a 9-track tape without specifying TRTCH=NOCOMP. Your job will run successfully. The system recognizes the type of tape you are
using and will act accordingly.
Throughout this chapter, optional parameters are shown in angle brackets (< >).
The EXEC statement for TPUTIL has the following format. All of the parameters are optional. If you do not use any parameters, one TAPEC tape drive is assumed.
// EXEC TPUTIL<,PARM=parm>, // <,DSN2=dsn>, // <,UNIT2=unit>, // <,VOL2=volume>
The parameters have the following meanings.
specifies an input control statement to TPUTIL, allowing you to simplify the coding of some runs, where "parm" is
a complete TPUTIL control statement. (See the example below.)
are used for the allocation of the appropriate number of tape units for any
particular step. The default is DSN1= and DSN2=NULLFILE. This allocates one tape drive (as for a MAP). If you only need one tape drive, do not use DSN1 or DSN2.
If you need two tape drives (e.g., for a BACKUP
or COPY), specify DSN2= on the EXEC statement, as follows:
/*SETUP TAPEC,2 // EXEC TPUTIL,DSN2=
or
/*SETUP TAPE9,1 /*SETUP TAPEC,1 // EXEC TPUTIL,UNIT1=TAPE9,DSN2=
or
/*SETUP TAPE9,2 // EXEC TPUTIL,UNIT1=TAPE9,UNIT2=TAPE9,DSN2=
If you do not need any tape drives (as for an edit run), code
DSN1=NULLFILE as follows:
// EXEC TPUTIL,DSN1=NULLFILE
Do not forget to add or delete the appropriate JCL SETUP statements.
is
the type of tape drive to be allocated for the input volume. The default for "unit" is TAPEC.
is the type of tape drive to be allocated
for the output volume, if any. The default for "unit" is TAPEC.
are the volume serial of a tape retained in a previous step to be passed to this step, if needed.
A TPUTIL control statement is a command (e.g., BACKUP) with all necessary parameters. All control statements and the parameter field of the EXEC statement are scanned by a single scan routine.
You can use abbreviations for keywords. Minimal abbreviations for the keywords are indicated by capital letters in this chapter. For example, the minimal abbreviation for the keyword "Linesize" is "L".
The majority of parameters are optional. If you do not specify a parameter, TPUTIL will use the default value (or derive the value from your JCL DD statements). In this chapter, any TPUTIL command
parameter that is not indicated as required is optional and is enclosed in angle brackets (< >).
When you specify multiple operands for a keyword parameter, enclose the list in parentheses. For example, to specify both the NOCHECK and NLFORCE options of the DUMP command, code the
following on the control statement:
OPTIONS=(NOCHECK,NLFORCE)
The keywords can be listed in any order on the control statement.
To continue a control statement, code a comma immediately after the last parameter on the first line; then begin the next parameter on the next line. You can use up to five continuation lines for one control statement.
You can use the PARM= field of the EXEC statement to supply many control statements and simplify the coding of many runs. For example,
// EXEC TPUTIL,PARM='MAP VOL=MYTAPE'
You can use all 80 columns of the control statement unless you specified the SEQUENCE option as described in the OPTIONS command. When the SEQUENCE option is used, only columns 1-72
are scanned for control information.
Figure 1 shows a simple JCL setup to dump the contents of a cartridge tape. This job will cause the tape MYTAPE to be dumped using all default parameter values.
TPUTIL retains a tape on the tape drive if it can. In some cases, however, TPUTIL might request a second mount of the same tape. To avoid a re-mount and save a few seconds and the additional charge, use the
following procedures:
Specify RETAIN in the prior step(s).
Specify VOL1=xxxxxx on the TPUTIL EXEC statement.
Have the first TPUTIL control statement refer to that volume.
For example, if you want to write on the tape in the first step of a job and then map or dump it using TPUTIL in the next step, specify VOL=(,RETAIN,SER=xxxxxx) on the DD statement used to write the tape in the
first step. This will keep the tape on the drive. Next, specify the VOL1=xxxxxx keyword parameter on the TPUTIL EXEC statement to keep the tape from being re-mounted. If the first TPUTIL control
statement refers to a volume other than the one specified with the VOL1= keyword, the volume will be dismounted and the one specified in the control statement will be mounted, even if you later reference the volume with a control statement.
The OPTIONS command lets you specify several options (such as length of a line or lines per page) that will be used throughout the execution of the program. If you use the OPTIONS command, it must come before
the commands you want it to effect. The command itself and all of its parameters are optional.
OPTIONS <,PAGESIZE=n><,OPTIONS=options>, <,DELIMITER=string>
Linesize=nspecifies
the maximum number of characters per line (70-132) on the output print data set. A line size of 112 will give 80 characters for dumps in the VHEX and CHAR formats. The ABEND format,
MAP command and BACKUP command all require at least 120 characters per line. The default value is LINESIZE=132.
Pagesize=nspecifies
the maximum number of lines per page (15-32767) on the output data set. The default is PAGESIZE=82.
Title=stringspecifies
a title ('string') that will appear in the heading of each printed page. This string can be up to 80 characters long and will be truncated as necessary to fit in the heading. The string must be in single quotes if it
contains blanks or special characters.
Delimiter=stringspecifies the character string to be placed at the end of every record dumped. The string length is limited to two characters.
Options=optionsspecifies any of the following execution options:
Go(Default) continues processing on the next valid command when a parameter statement is found to be in error.
Nogowill stop processing when a parameter statement is found to be in error. All remaining parameter statements will be listed.
Editchecks the syntax of the control statements. Does not attempt to execute any commands.
Sequenceignores columns 73-80 because they contain sequence numbers. The sequence operand is effective with the next input
statement so if all of your job's statements are sequenced, specify SEQUENCE on the EXEC statement as follows:
// EXEC TPUTIL,
// PARM='OPTIONS=SEQ'
Termsuppresses all line skips and page headings on the printed output. This is used mainly for terminal output.
The BACKUP command makes a backup copy of a tape volume. You can backup the entire tape, which will make a duplicate copy of your original tape, or select specific files to back up. Throughout this description, operand one applies
to the input tape volume and operand two applies to the output tape volume.
The BACKUP command requires the use of two tape drives. You must specify DSN2= on the EXEC statement as described above. Note: Since NERDC has only one TAPE8 drive, it is not possible
to BACKUP or COPY a TAPE8 tape to another TAPE8 tape.
The VOLUMES parameter is required; all others are optional.
BACKUP VOLUMES=(vol1,vol2)<,SELECT=selopt>, <DENSITY=(den1,den2)>, <FILES=(n,n,...,n)><,OUTFILE=n>, <ERRCNT=n><,RETRIES=n>, <DDNAME=(ddname1,ddname2)>, <TRTCH=(trtch1,trtch2)>,
<OPTIONS=options>
Volumes=(vol1,vol2)(Required) supplies the volume serial of the tape volumes to be used in the backup operation. The input volume is vol1 and the output volume is vol2.
Select=seloptspecifies one of the following select options:
All(Default) selects all records and labels that do not cause an I/O error when read.
Recordsselects all records that do not cause an I/O error when read.
Labelselects
labels when the EVEN or ONLY operand is used.
Evenselects all records, even if an I/O error occurs when they are read.
Onlyselects only the records that cause an I/O error when read.
DEnsity=(den1,den2)specifies the tape density with which the tapes are recorded. The default values are the highest density supported on the tape drives used. This is ignored for cartridge tapes. For 9-track tapes, valid densities at NERDC are:
4 | 6250 bpi |
3 | 1600 bpi |
2 | 800 bpi |
Files=(n,...,n20)specifies up to 20 input tape file numbers. Only these files are copied to the output tape. The default is to copy all files.
OUtfile=nspecifies the first file to be used on the output tape. File n will be rewritten if it exists and replaced by the first file selected from the input tape. Any remaining files to be copied from the input tape will be copied to successive files on the output tape. The default is n=1.
Errcnt=nspecifies the number of I/O errors to allow in one file on either the input or output tape. When this value is exceeded, the backup operation is aborted. The default is 10.
Retries=nspecifies the number of retries to attempt before defining any error indication as a permanent I/O error. The default is 10.
DDname=(ddname1,ddname2)
specifies
alternate ddnames to be used in the backup operation. The default is (SYSUT1,SYSUT2).
Trtch=(trtch1,trtch2)specifies the type of tape compaction to be used. This applies to cartridge tapes only. The default is to use the system default, which is to compact cartridge tapes, or to use the information derived from the tape label. See the section on tape compaction support.
OPtions=optionsspecifies
the following options for the BACKUP command:
CheckSee (Default) verifies that the volume serials of both tapes are those requested on the parameter statement. This can only be done when the tapes are standard labeled..
NOcheckSee does not verify that the correct input tape is mounted. This does not affect the output tape label verification..
ForceSee ignores any end-of-volume indication..
NLforceSee treats the input tape as if it were non-labeled..
The COPY command copies a tape volume, a multi-volume tape data set, or individual tape files. It allows you to alter many file characteristics when the tape is copied. COPY will pick up many tape and data set
characteristics from your JCL, tape labels, and command parameters. It is possible to alter many data set characteristics when a tape is copied using this command.
You may also use the PARM keyword on the EXEC statement to specify the COPY command and provide all other information about the tapes via the SYSUT1 and
SYSUT2 DD statements.
Throughout this description, operand one applies to the input tape volume and operand two applies to the output tape volume. Note that the COPY command requires the use of two tape drives, so you must specify DSN2=
on the EXEC statement.
All of the parameters on the COPY command are optional. If you wish to use the default value of a parameter, or if you provide the information via DD statements in your JCL, you do not need to include
corresponding COPY parameters.
COPY <VOLUMES=((vollst1),(vollst2))>, <DENSITY=(den1,den2)><,TRTCH=(trtch1,trtch2)>,
<FILES=(n,...,n20)><,OUTFILE=n>, <LABELS=(lb1,lb2)><,LRECL=(lrecl1,lrecl2)>, <RECFM=(rf1,rf2)><,BLKSIZE=(blk1,blk2)>,
<DSNAME=(dsn1,...,dsn10)>, <STARTAFTER=n><,STOPAFTER=n>, <SKIP=(n,PICK=m)><,DDNAMES=(ddname1,ddname2)>,
<OPTIONS=options>
Volumes=((vollst1),(vollst2))
supplies the volume serial of the tape volumes to be used in the copy. The input volume list is vollst1 and the output volume list is vollst2. Each list may contain up to three volumes.
To copy one tape to another:
VOL=((intape),(outtape))
To copy a multiple tape data set (e.g. one that spans two tapes)
VOL=((intape),(outtape))
To copy a multiple tape data set (e.g. one that spans two tapes)
VOL=((intape1,intape2),(outtape1,outtape2))
or
VOL=((intape,intape2),(outtape1))
DEnsity=(den1,den2)specifies the tape density with which the tapes are recorded. The default values are the highest density supported on the tape drives used.
Trtch=(trtch1,trtch2)specifies the tape recording technique used. The default is TRTCH=null which results in COMP (compaction) for cartridge tapes. See the section on tape compaction support.
Files=(n,...,n20)specifies up to 20 input tape file numbers. Only these files are copied to the output tape. The default is to copy all files. It is not necessary that all files specified in the series to be copied have the same RECFM, LRECL, and BLKSIZE.
OUtfile=nspecifies the first file to be used on the output tape. File n will be rewritten and replaced by the first file selected from the input tape. Any remaining files to be copied from the input tape will be copied to successive files on the output tape. The default is n=1.
DDnames=(ddname1,ddname2)
specifies alternate ddnames to be used in the copy operation. The default is (SYSUT1,SYSUT2).
Recfm=(rf1,rf2)specifies the record format of the input and output files. By default the input record format is set from the input tape label and the output record format is set from the input record format.
LRecl=(lrecl1,lrecl2)specifies the input and output logical record length. By default the input lrecl is set from the input tape label and the output lrecl is set from the input lrecl.
Blksize=(blk1,blk2)specifies the input and output block size. By default the input block size is set from the input tape label and the output block size is set from the input block size.
LAbels=(lb1,lb2)specifies the tape label characteristic of the tape volumes (SL, NL, etc.). The default is to preserve the existing label characteristics.
DSnames=(dsn1,...,dsn10)
specifies
up to 10 data set names for files on the output tape. If you want to change the data set names while copying more than 10 files, you will need to issue two COPY commands. Even though the FILES parameter allows you
to specify more than 10 files at a time, the DSNAMES parameter will only name up to 10 at a time.
STArtafter=nstarts to copy after skipping n records. The default is to copy all records.
STOpafter=nstops copying after copying n records. The default is to copy all records.
SKip=(n,Pick=m)copies m records, then skips n records. To copy
every 10th record (beginning with and including record 1), specify SKIP=9. To copy the first 2 records out of every 10, specify SKIP=(8,PICK=2). The default is SKIP=(0,PICK=1), or copy
all records.
OPtions=optionsOPtions=(option1,option2,...)
lists
options that can be specified for the COPY command:
Check(Default) verifies that the volume serials of both tapes are those requested on the parameter statement. This can only be done when the tapes are standard labeled.
NOCheckdoes not verify that the correct input tape is mounted. This does not affect the output tape label verification.
Forceignores any end-of-volume indication.
Mergecreates one output file from the specified input files.
NLforcetreats the input tape as if it were non-labeled.
COPY
uses QSAM for all data file access and uses EXCP I/O for input tape label processing only.
In this example, there is a tape file that spans tapes intape1 and intape2. Files on these tapes will undergo compaction and will then be copied to tape outtape1 and outtape2 as space is needed without changing any other characteristics.
Figure 6. Using the COPY Command to Copy Multiple Volumes.
//jobname JOB (,,time,lines),'your name',CLASS=class /*ROUTE PRINT node.location /*SETUP TAPEC,2 // EXEC TPUTIL,DSN2= COPY VOLUMES=((intape1,intape2), // (outtape1,outtape2))
This example uses the PARM keyword on the EXEC statement to invoke the COPY command. Information about the tapes is passed via DD statements TAPE1 (the input tape) and
TAPE2 (the output tape).
Figure 7. Providing Information for the COPY Command via DD Statements.
//jobnameJOB (,,time,lines),'your name',CLASS=class/*ROUTE PRINTnode.location/*SETUP TAPEC,2 // EXEC TPUTIL,DSN2=,PARM='COPY DD=(TAPE1,TAPE2)' //TAPE1 DD UNIT=(TAPEC,,DEFER),DISP=(,KEEP),VOL=SER=intape//TAPE2 DD UNIT=(TAPEC,,DEFER),DISP=(,KEEP),VOL=SER=outtape//*
This example will copy files one, three, and five from tape intape and merge them into a single file. It will then copy the merged file to file #2 on the tape outtape.
The DUMP command lets you dump all or part of a tape in character and/or hexedecimal format. The DUMP command has the parameters shown below. The VOLUME parameter is required; all others
are optional.
DUMP VOLUME=serial<,SELECT=selopt><,FORMAT=foropt>, // <FILE=(n,n,...,n)><,SKIP=(n<,PICK=m>)><,STARTAFTER=n>, // <STOPAFTER=n><,LAST=n><,LRECL=n><,RECFM=recfm>, // <DENSITY=den><,TRTCH=trtch><,ERRCNT=n><,RETRIES=n>, // <BLKSIZE=n><,DDNAME=ddname><,OPTIONS=options>
Volume=serial(Required) provides the volume serial of the tape to be dumped.
Select=seloptdetermines if records and/or labels are to be formatted and dumped.
All(Default) selects all labels and any records that do not cause an I/O error.
Recordselects any records that do not cause an I/O error.
Labelsselects all labels.
Evenselects all labels and all records (including those that cause I/O errors).
Onlyselects all labels and only those records that cause I/O errors.
Labels and records selected can be modified by the use of other keywords in the DUMP command (for example, FILE, LAST, SKIP, etc.) described below.
FORmat=foroptselects the format used in printing the dump of all selected records.
Char(Default) dumps any selected records in a 100-character-line format.
Abenddumps any selected records in an ABEND dump format.
Hexdumps any selected records in a hexadecimal format. The format will be 100 characters wide (2 hex digits for each of 50 bytes).
Vhexdumps any selected records in a vertical hexadecimal format. This format will have 100 bytes across the page with each 100 bytes taking 4 lines to print.
Nonedumps any selected records in a 132 characters-per-line format. (Don't do any formatting.)
Refer
to the LINESIZE parameter of the OPTIONS command for more information about specifying your output line length.
FIle=(n,...,n20)specifies up to 20 different files to be dumped. The default is to dump all files.
SKip=(n,PICK=m)dumps m
records, then skips n records. To dump every 10th record (beginning with and including record 1), specify SKIP=9. To dump the first 2 records out of every 10, specify SKIP=(8,PICK=2). The default is
SKIP=(0,PICK=1), or dump all records.
STArtafter=nstarts to dump after skipping n records. The default is to dump all records.
STOpafter=nstops dumping after dumping n records. The default is to dump all records.
LAst=ndumps
the last n records. The default is to dump records as selected by other parameters. If the SKIP, STARTAFTER, and STOPAFTER parameters are not used, and LAST is
specified, only the last n records are dumped.
RECfm=recfmspecifies the record format used to unblock the records from the
tape. The correct record format will be assumed for OS standard labeled (SL) tapes. For NL tapes, the default is RECFM=U; for SL tapes, the default is whatever is
specified on the tape labels.
Blksize=nspecifies the maximum blocksize used on the tape. The default is either 32,760 or the value specified in the tape labels for a standard labeled tape.
LRecl=nspecifies the logical record length to be used in
unblocking the tape. This will override the value in the tape label if used with a standard labeled tape. The default for a non-labeled tape is the full block. (Note: to override the LRECL value, RECFM will
probably have to be specified also.)
DEnsity=denspecifies the density (den) of the tape. The default is the highest density supported on the tape drive involved. Possible parameters are 2, 3, or 4 for 800, 1600, or 6250 bpi, respectively. Density is ignored for cartridge tapes.
ERrcnt=nallows
n I/O errors to occur before cancelling the dump of this tape (default is 10). You must specify the ERRCNT parameter if you specified SELECT=EVEN or ONLY and you want an error cutoff.
RETries=nretries n times before declaring an I/O error (default is 10).
DDname=ddnamespecifies the ddname to be used by the DUMP
command (default is DDNAME=SYSUT1).
Options=optionsspecifies many different options of the
DUMP command.
CHeck(Default) checks the input tape's labels (if any) to verify that the correct tape is mounted
NOCheckdoes not check the input tape's labels to verify that the correct tape is mounted
Punchallows you to dump records from your tape to another tape or disk
data set. Use DD name SYSPUNCH when identifying the output data set and DCB characteristics in your JCL. The LRECL is not limited to 80 bytes.
NOPrintsuppresses
printing of the dumped records. You may wish to use this option when using PUNCH to dump records to a data set.
Forceignores any end-of-volume indication.
NLForcetreats any tape as being non-labeled
COuntcounts the number of records and blocks in each file. This parameter will increase the amount of I/O if the entire file is not being dumped. It can therefore increase the charges for the job.
Blockdoes
not block any of the selected blocks (treats all blocks as if they were RECFM=U)
This job will dump 30 records from files 3 and 10, beginning with record number 13 of each file.
Output from the DUMP command provides information in four major components. They are the Volume Label, the file Header Label, the file data, and the file Trailer Label. The latter three components are repeated as many times as
needed to represent all files on the tape. The DUMP command helps you see the contents of tape files. Sometimes, it can also be used to "map" a tape when the MAP option cannot be used. The following is a
brief explanation of each output item.
Volume Label. This label identifies basic tape volume attributes.
INPUT COMMAND STATEMENTS.
This is a list of user options that you specified for this job.
VOLUME SERIAL SPECIFIED. This shows the name of the tape volume that you specified.
ACTUAL
TAPE DENSITY. This is the density in bits per inch (BPI) of the volume mounted on the tape drive.
TAPE IS. This indicates the type of
label found on this tape. Usually, it is standard-labeled ( ** LABELEDSL) or non-labeled (NL).
VOLUME SERIAL. This shows the internal-volume name found on
the tape that is currently mounted. Compare this with VOLUME SERIAL SPECIFIED. If they do not match, then the job will be cancelled. You can specify OPTION=NLFORCE to continue dump processing.
TAPE
RECORDING TECHNIQUE. This tells you if your cartridge tape was recorded in compacted format or non-compacted format. This is especially important if you plan to take this tape to another site. Not all 3480 cartridge drives read/write in
compacted format.
Header Label (HDR1). The Header Label gives basic information about a particular file on the tape.
DATA
SET NAME. The data set name is the name of the file on the tape. Notice that only the last seventeen (17) characters of the name are recorded. When you bring a tape file back to disk, you will need to specify the entire fully-qualified
data set name, not just the last seventeen characters.
DATA SET SERIAL NUMBER. This is another place that your tape name (volume/serial) is listed.
VOLUME
SEQUENCE NO. This tells you which tape number this is in a sequence of tapes. For example, if you have two volumes of data, this field would specify which tape was mounted (1 or 2).
DATA
SET SEQUENCE # (FILE #). This specifies the relative position of a file on the tape. It also lets you see how many files are on a tape which is important if you wish to add a file without overwriting existing files.
CREATION
DATE. This is the date the file was written to tape.
EXPIRATION DATE. This field is used in production work to determine when a tape may be recycled. It does not mean that
the data will be lost or changed on this date.
DATA SET SECURITY. This indicates whether or not a password is required to access this data set.
Header
Label (HDR2). The HDR2 label provides additional information about a file on the tape.
RECORD FORMAT. The record format gives you
information about the records in a file. For example, are they all the same length? A more complete explanation of record formats can be found in any system 370/390 JCL manual.
BLOCK LENGTH.
This field specifies the size of a block of data. BLOCK LENGTH must always be a multiple of the RECORD LENGTH. So, to determine the number of records per block, divide the
BLOCK LENGTH (also called Block Size) by the RECORD LENGTH.
RECORD LENGTH. This tells you how many bytes of data are in each record.
TAPE
DENSITY. This specifies the number of bits per inch (BPI) recorded on the tape. This may be important if you plan to take this tape to another site.
DATA SET POSITION. This
field tells you if more than one tape volume was needed to read a particular file. A zero means no; a one means yes.
CREATION JOB/JOB STEP. This represents the name of the job, and the job
step name, that was used to create this data set.
TAPE RECORDING TECHNIQUE. This will be either COMPACTED or NOCOMP (not compacted). Only
cartridge files may be compacted. If you plan to take your tape to another site, you should copy it in NOCOMP format first.
PRINTER CONTROL CHARACTER. This indicates
whether or not printer carriage control characters appear in column one of the file.
BLOCK ATTRIBUTE. This describes how the data is arranged on the tape. Normally, it will be blocked data.
Data. The number of records you specify will be printed. If your tape is non-labeled, the system will print blocks of data instead of records.
Trailer Label. The trailer label specifies the same information as the Header Label,
with the addition of the "BLOCK COUNT" field that tells how many blocks are used to store file records.
The MAP command requests a compressed listing of the tape labels for a standard labeled tape. The listing includes the file number, data set name, record format, block length, block count, density, tape recording technique,
creation date, and expiration date.
For NL tapes, the MAP command lists the first 80 bytes of each file.
The VOLUME parameter is required; the others are optional.
MAP VOLUME=volser<,DDNAME=ddname><,OPTIONS=options>
Volume=volser(Required) provides the volume serial of the tape to be mapped.
Ddname=ddnamespecifies the ddname to be used for the MAP operation. The default
is DDNAME=SYSUT1.
Options=Nochecktells the MAP processor not to verify that the correct standard labeled tape
is mounted.
This job produces a file map of the standard labeled tape STRTRK.
Your output from the MAP command provides ten items of information about the data stored on the tape. This information will be in a table on the page titled, 'FILE MAP OF VOLUME xxxx', where xxxx is the name
of your tape. The following is a brief explanation of each output item.
FILE NUMBERThis specifies the position of a file on the tape. It also lets you see how many files are on a tape. This is especially important if you wish to add a file to a tape without overwriting existing files.
DATA SET NAMEThis specifies the name of a file on the tape. Notice that only the last seventeen (17) characters of the name are recorded. When you bring a tape file to disk, you will need to specify the entire fully-qualified data set name.
RECORD
FORMATThe format of a file may be specified by one or more of the following characters. Most tape files are FB. This means that the record lengths are all the same and that they are recorded in blocks. A more complete explanation of these types can be found in any system 370/390 JCL manual.
First Character
FFixed-length records
VVariable-length records
UUndefined-length records
DVariable-length ASCII tape records
Next Characters (can be more than one)
BBlocked records
SSpanned records (spanned over more than one block)
AAn ASA control character is the first byte of each record to control the printer.
MA machine code control character is the first byte of each record and is used to control the printer.
BLOCK LENGTHThis
field specifies the size of a block of data. BLOCK LENGTH must always be a multiple of the RECORD LENGTH. So, to determine the number of records per block, divide the BLOCK
LENGTH (also called Block Size) by the RECORD LENGTH.
RECORD LENGTHThis tells you how many bytes of data are in each record.
BLOCK COUNTThis reports the number of blocks of data each file contains. You can use the
BLOCK COUNT to determine the number of records in a file by multiplying the BLOCK COUNT by the number of records per block (see BLOCK LENGTH).
DENSITYThis specifies the number of bits per inch (BPI) recorded on the tape. This may be important if you plan to take this tape to another site.
TAPE RECORDING TECHNIQUEThis
will be either COMP (compacted) or NOCOMP (not compacted). Only cartridge files may be compacted. If you plan to take your tape to another site, you should copy it in NOCOMP
format first.
CREATION DATEThis is the date this file was written to tape.
EXPIRATION
DATEThis field is used in production work to determine when a tape may be recycled. It does not mean that the data will be lost or changed on this date.
The TRANSLATE command modifies the execution of the DUMP command to make data recorded in other character codes easier to understand. TPUTIL provides some of the common translate tables. You
can also code your own translate table if necessary.
The command itself and all of its parameters are optional. If you use the TRANSLATE command with no parameters, the DUMP command will assume standard EBCDIC character code (the same as no TRANSLATE
command).
TRANSLATE <TO=trtb1><,FROM=trtb1>, // <type,(string1,string2)><, START=hh><,FILL=string>
TPUTIL has several pre-defined translate tables. To access one of these tables, use either the TO (translate TO a specific character set on output) or FROM (translate FROM a specific
character set on input) keyword. The translate tables that can be specified are the same for each keyword. Both keywords can be coded if needed.
TPUTIL provides the following translate tables (minimal abbreviations are shown in upper case):
EBCDIC(Default) IBM System/370 standard character code
ASCIIASCII 7-bit code with no parity
ASCII-EvenASCII 7-bit code with even parity
ASCII-OddASCII 7-bit code with odd parity
BCDIBM 6-bit code used on the 1401. This code is also used by many other types of six-bit machines.
CDC-consoleControl Data Corporation console code. This is used for some source tapes sent from CDC installations.
FieldataUnivac's Fieldata code
You only need the remaining parameters when one of the translate tables above does not apply. The discussion of these parameters assumes that you are familiar with the concepts of the "TRANSLATE" machine instruction and
its associated translate table.
typespecifies the input format of data to be placed in the translate table.
Character(Default) specifies that each translate table location will be represented by a single character on the input statement.
Hexspecifies that each translate table location will be represented by the two-digit hexadecimal representation of the character.
(string1,string2)If
only the first string is specified, it is placed in the next empty location in the translate table or the location specified by the START parameter. When both string1 and string2 are specified, string1 is used as a location string
and string2 is used as a replacement string. In other words, the character at offset string1 in the translate table is replaced with string2. (Note that this is a character-to-character replacement.)
FIll=stringThe
FILL parameter can be specified only on the first TRANSLATE control statement following the DUMP command. The string is either a single character or the hex representation of the character to be used to
fill all locations in the translate table before placing any other strings in the table. The TYPE operand indicates which input format to expect.
Start=hhspecifies
the first location in the translate table to place string1. The value is always in hex.hh
This job will read an ASCII tape. Each block will be broken into 80-character records. Each record will then be translated from the ASCII character to the EBCDIC character and printed. The title specified in the TITLE option
of the OPTION statement will be printed on each page of output.
Tape TSTDT1 will be copied to tape BCKDT1. Then the labels (if any), the first two records, and the last 2 records of each file will be dumped to verify the backup operation.
Figure 12. Using the BACKUP Command to Duplicate a
Cartridge Tape.
//jobnameJOB (,,time,lines),'your name',CLASS=class/*ROUTE PRINTnode.location/*SETUP TAPEC,2 // EXEC TPUTIL, // DSN2= BACKUP VOL=(TSTDT1,BCKDT1) DUMP VOL=BCKDT1,STOP=2,LAST=2
This job will syntax-check all control statements (OPT=EDIT). No tapes will be mounted and DSN1=NULLFILE will prevent the allocation of any tape drives.
Figure 13. Running a Syntax Check on
TPUTIL Control Statements.
//jobnameJOB (,,time,lines),'your name',CLASS=class/*ROUTE PRINTnode.location// EXEC TPUTIL, // DSN1=NULLFILE OPT OPT=EDIT DUMP VOL=ANY,SKIP=(20,PICK=5),STOP=30, // LAST=15,START=12,FILE=(3,7,10) BACK VOL=(TSTONE,TSTTWO), // FILE=(1,5,7,9),OUTF=3 MAP VOL=TESTER,DDNAME=EXTRA
The default for the MAP option is in EBCDIC format which is not good for a tape written in the ASCII format. How can you get around this restriction? Use the DUMP command combined with the TRANSLATE
command to dump the first few records of each file on the tape. The TRANSLATE command is used to modify the execution of the DUMP command to make data recorded in other character codes easier to understand.
If your tape is a standard label ASCII tape, each file on the tape will be preceded by a header label and followed by a trailer label. These labels contain information about the data set including the record length and block size. If you dump the
first few records of each file on the tape, with the SELECT=ALL parameter, even the labels are dumped as files. That is how you can pick up the LRECL, BLKSIZE, data set name and other
information.
According to System 370/390 JCL by Gary D. Brown, the label file looks like this:
| Byte Position | No. Bytes | Contents (80-byte records) |
| 1 | 4 | Characters
'HDR2' or 'EOV2' or 'EOF2' |
| 5 | 1 | Record format (F, V, etc.) |
| 6 | 5 | BLKSIZE |
| 11 | 5 | LRECL |
| 16 | 1 | DEN |
This is not the complete table, but you may browse this book at the NERDC Support Desk (392-2061) if you do not have this reference.
If your tape is not a standard label tape (non-labeled), you would not be able to get the LRECL or BLKSIZE from this method or from a tape map. Both rely on getting the information from the label for
each file. On a non-labeled tape, no information is stored on the tape to describe the format of the data.
For a non-labeled tape, use the keyword STOPAFTER= to specify 5 or more records to be dumped. Since the record length will be unknown, data will be read until the interblock gap is reached which indicates the end of a block.
You will get 5 blocks dumped instead of records. However, you will also get a report of the BLKSIZE next to the printed block of data. If all of the blocks are the same size, you can make a good guess that the blocks are of fixed
length.
Getting the record length is not as easy. Based on your own knowledge of the data, you can count/guess the number of bytes per record. Sometimes you can see repeating patterns in the printed block of data that can help you make a better guess. If
you are still unable to determine the LRECL, you must contact the person who gave you the tape for this information.
This example dumps the first two records of each file from a reel tape (TAPE9). If the tape is a standard label ASCII tape, the first two records of each label will also be dumped. This is established by SELECT=ALL. The
keyword STOPAFTER controls how many records are dumped.
Figure 14. Mapping an ASCII or Non-labeled Tape
//jobnameJOB (,,time,lines),yourname,CLASS=class/*SETUP TAPE9,1 /*ROUTE PRINTnode.location//** //* PRINTS 2 RECORDS FROM EVERY FILE AND TRANSLATES FROM //* ASCII INCLUDING LABELS IF PRESENT //** //MAP1 EXEC TPUTIL,UNIT1=TAPE9,VOL1=tapename//SYSIN DD * DUMP VOL=tapename,SELECT=ALL,STOPAFTER=2 TRANSLATE FROM=ASCII /*