Tricks With Tapes: August 19, 2004 Session 2824
Tricks With Tapes: August 19, 2004 Session 2824
S H A R E
Session 2824
T R I C K S W I T H T A P E S
• Books
• Hardware
• Software
• Using Magnetic Tapes
• DFDSMSdfp: Advanced Services
1. A tape drive
• Languages
• Assembler
• Everything else
• BLP
• APF
Standard IBM Access Methods that are used to read and write to
tapes:
1. EXCP
2. BSAM
3. QSAM
The reason why you need BLP privilege is to cause the MVS system
to ignore the contents of the tape labels.
• Labels
• Files
• Tape Marks
Data on tapes:
Labels really are files too, but the system uses them.
Files can be FB, VB, or U, the same way disk data is.
1 HDR label group (VOL1 label first, if first file on the tape)
2 the data blocks
3 EOF or EOV label group
EBCDIC (IBM) Tapes, and ASCII
(ANSI/ISO) Tapes
• EBCDIC (IBM) Tapes
• Standard Labels supply most need information
Most of the tapes we deal with, in an MVS shop, are IBM tapes.
But MVS does actually have some support for ASCII tapes (usually
tapes coming from, or going to, other systems).
The "Using Magnetic Tapes" book spends half its space on ASCII tapes.
(This is probably because they are a world unto themselves.)
There are two commonly used "LEVELS" or standards, for ASCII tapes.
The 80th character of the VOL1 label has the level number.
• Tools
• DITTO
• RMM
• VENDOR tools
• TelTape from www.cartagena.com
Copying Tapes.
Reasons:
IBM doesn't really supply any tools at all for copying tapes,
except:
So why doesn't IBM give Joe any tools for copying a tape from
end to end?
But copying a tape is very easy in concept: You just have to:
It did just that. Except that since the data was in a buffer,
it could be copied to more than one output tape.
• What is on a tape?
• Non-Free Tools
• DITTO (IBM) which is not free
• IBM may provide other tools
• VENDOR Tools like FATS/FATAR
• Free Tools Bonanza!
• http://www.cbttape.org to get these free tools!
• 1. TAPEMAP (CBT File 299, and Leonard Woren's)
• 2. TAPESCAN (CBT File 102)
• 3. COPYMODS (CBT File 229) - I mean the NEW COPYMODS
• 4. SS0104 (CBT File 266)
• 5. TCOPY (CBT File 193)
• Mapping and Copying tapes are related activities
All that stuff is well and good when it comes to copying a tape.
But what if you just need to find out what is on a tape, and
extract one or more of the files from it?
But here's where the users have written most of the good stuff !!
Examples:
2. Data information - you can scan the data itself to find out
C. HEX and EBCDIC (or ASCII) print, to find out more detail
about the tape data AND the labels.
All this stuff should (at least) have the result that you can then
extract any data you want, off the tape.
In the P/390, the format of the disk file which the P/390 can read
as a "tape" is called AWS format. It was quite simple to call it
that--AWS is the IBM three-letter prefix for all of the P/390
driving software.
For example, the headers for a file consisting of the VOL1, HDR1,
and HDR2 labels, followed by a tape mark are:
X'0000',X'0000',X'4000'
Particular Tools to Use
• Free Tools
• Tape copying and tape mapping tools. COPYMODS from CBT File
229 does both!
I took a tape copying tool, and made a tape mapping tool also
out of it. This is the COPYMODS program, from CBT File 229.
The reason you can do that, is that both tape mapping tools
and tape copying tools read the same tape information. It's
just a question of how much of the tape information you want
to report about.
These are HEADER LABELS, the data file itself, TRAILER LABELS.
COPYSLNL strips off the labels when copying tape files. So the
result of copying from an SL tape is an NL tape.
//SYSIN DD *
7/5 8 22
//SYSIN DD *
7/5 8 22 ALL
//SYSIN DD *
7/5 8 22 -50
TAPEMAP
The version that was released to the public many years ago
by UCLA was played with by many people, including me. Dave
Cole put in a bunch of enhancements in 1984. Dave Cole put
in 64K block support.
The TAPEMAP program can read a CBT Tape and tell you what
member names are in all of the files and imbedded pds'es.
TAPEMAP - 2
TAPEMAP - 2
------------------------------------------------------------------------
RELOAD FILE PSWD INFO
FORMAT SEQ# DATASET NAME REQD C-DATE E-DATE SOURCE RECFM L
------------------------------------------------------------------------
1 FILE0001 04.207 98.000 LABELS FB
CBT DOC 2 VER 466 07-25-04 SCAN F
TAPEMAP - 3
If IEBCOPY is the format, you get DCB info about the original pds,
as well as all the member names.
If FDR is the format, you get the datasets that were dumped.
If SMPPTFIN is the format, you get the PTF numbers and APAR
numbers, etc.
TAPESCAN
TAPESCAN formats the labels and gives a hex print of the first
100 bytes of the first nnn records on each tape file. Default
is 4 records. If the tape is SL, TAPESCAN will give you a
"tape VTOC" at the end of the report, based on the tape label
information.
TAPESCAN does not tell you the format of the tape files. That
is TAPEMAP's specialty.
TAPESCAN - 2
• TAPESCAN Report
• TAPESCAN 5.2 -------- TAPE ANALYSIS AND
COPYING PROGRAM 07/30/04
TAPESCAN - 2
TAPESCAN - 3
These are:
Only one COPYMODS function does not read the tape: LBDQUICK
That is because LBDQUICK was developed to dump the tape labels
from a tape that has "too many" data blocks, like a million,
so it "fast forwards" through the tape's data files.
COPYMODS Functionality.
COPYMODS JCL
You can add PARM input in the EXEC card, or SYSIN input.
Both are automatically recognized by the COPYMODS program.
COPYMODS PROGRAM - EXTENDED TAPE COPY PROGRAM - LEVEL 080 - OPTIONS DISPLAY
OPTIONS IN EFFECT:
BLOCK COUNTS in EOF1 and EOV1 are being corrected for TAPE COPY
operation, when outputs are SL.
FILE 00001 CONTAINS 0000142 DATA BLOCKS
FILE 00002 CONTAINS 0000001 DATA BLOCKS
FILE 00003 CONTAINS 0000006 DATA BLOCKS
FILE 00004 CONTAINS 0000002 DATA BLOCKS
FILE 00005 CONTAINS 0000003 DATA BLOCKS
FILE 00006 CONTAINS 0000004 DATA BLOCKS
FILE 00007 CONTAINS 0000041 DATA BLOCKS
* * * * * * * * * * *
FILE 00698 CONTAINS 0000001 DATA BLOCKS
FILE 00699 CONTAINS 0000001 DATA BLOCKS
FILE 00700 CONTAINS 0000001 DATA BLOCKS
FILE 00701 CONTAINS 0000000 DATA BLOCKS
COPY CORRECTLY COMPLETED FOR OUT16
COPYMODS PARM TABLE
PARMTABL CSECT
DC X'07',X'00',C'LTMSKIP ',X'20000000000000000000'
DC X'07',X'00',C'SKIPLTM ',X'20000000000000000000'
DC X'07',X'11',C'COPYLTM ',X'20000000000000000000'
DC X'07',X'01',C'LTMCOPY ',X'20000000000000000000'
DC X'07',X'00',C'LBLINFO ',X'DE000000000000000000'
DC X'06',X'00',C'PRINTL ',X'DE000000000000000000'
DC X'06',X'00',C'LABELS ',X'DE000000000000000000'
LABLDUMP option of COPYMODS
(and LABADDIN)
• COPYMODS can not just copy tape labels it allows you to
manipulate them
• Note: PARM options can be either from EXEC card
PARM= field or SYSIN DD statement
• Labels can be peeled off a tape to save, study or for
editing
• Labels can easily be added to an NL tape
Sample JCL that shows what you can do. Please notice how
COPYMODS options can be introduced either in the EXEC card
PARM field or from the SYSIN DD card.
For LABADDIN you use the same JCL, except that the LABLDUMP
DD card becomes a LABADDIN DD card, and the LABADDIN PARM or
SYSIN keyword has to be coded. In that case, the input tape
has to be an NL tape. It could be the output tape of this
STRIP step. LABADDIN is the reverse process of STRIP and
LABLDUMP.
If you code the CHGVOL keyword, then the output volumes (if they
are SL) will have the volser specified in the JCL. A RDJFCB is
done on the output DD names, and the volsers are copied into the
program and plugged into the VOL1 labels.
These keywords make sure that BLOCK COUNTS in the EOF1 labels
of the output SL tapes are correct. COPYMODS has read the
input tape, and "knows" what the correct block count for each
tape file should be. So in order that MVS can read the output
tape and not hiccup, the correct block counts are inserted into
the EOF1 labels before the output tape is written.
FILELIMIT=nnn and
LABELIMIT=nnn
FILELIMIT=nnn will stop copying the input tape after nnn files
have been copied. FILELIMIT=nnn will force a tape rewind on
the input tape. nnn is multiplied by 3 if a SL tape is the
input tape. nnn is used without change, if an NL tape is the
input tape. You can force the multiplication by 3, using the
SLLIM keyword. You can force NO multiplication by 3, using the
NLLIM keyword.
This causes COPYMODS to read the tape from the //IN DD name,
and no //OUTx DD names are required.
This allows measuring the input tape, mapping the input tape,
and HEXPRT of the input tape records, to see what is on them.
COPYMODS can show you the first 132 bytes in hex, of the first
nnn blocks of a tape file. You use the HEXPRT option to invoke
the service, and you override the default of nnn=4 by using the
PRINTRCDS=nnn
SYSIN card.
COPYMODS has not had to correct any of the options as coded in the JCL.
NOTE - The HEXPRT option displays only original records before they have been
been changed by the COPYMODS program.
Option READONLY has been forced by not having any OUTxx DDNAMES coded in the JCL
LABELS ARE BEING DUMPED. OUTPUT DSN=SBGOLOB.CBT.CNTL
MEMBER=VOL466L1 VOLUME=DATA02
THIS RUN OF THE COPYMODS PROGRAM IS READ-ONLY. JCL VOLSER: VOL466
HEXPRT OPTION IS ON IN DEFAULT MODE. 4 RECORDS WILL BE HEX PRINTED.
TO OVERRIDE, CODE PRINTRCDS=nnn in SYSIN.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
VOL1VOL466 SAM GOLOB
EDDFEDDFFF4444444444444444444444444444444ECD4CDDDC444444444444444444444444444444
56315634660000000000000000000000000000000214076362000000000000000000000000000000
VOL1 LABEL HAS BEEN DETECTED - VOLSER = VOL466 OWNER = SAM GOLOB
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
HDR10000000000000000000000000000000000000000000000000000000000000000000000000000
CCDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
84910000000000000000000000000000000000000000000000000000000000000000000000000000
FILE 00001 CONTAINS 0000002 DATA BLOCKS
TAPE READ CORRECTLY COMPLETED FOR DDNAME IN, VOLUME SERIAL VOL466
Using VTT2TAPE, you can go from a FB-80 folded AWS tape file
and cut a real tape, on a real MVS tape drive. I think this
is the only way you can cut a real tape from an AWS tape, on
MVS. That is why I wrote VTT2CNVU. That will take a VB AWS
tape and convert it into the FB-80 folded format, so you can
use VTT2TAPE to cut a real tape from it.
SUMMARY
My email : [email protected]
Good luck!