|
» |
|
|
|
Tapes written on foreign machines often have to be read on HP
3000 systems. If you don't know the exact data
format, here are some ideas that might help you determine what it
is. Mount the tape on your HP 3000 (without a write ring). The
automatic volume recognition message tells you if it is labeled, and if so, what
the label is. If the tape is ANSI-labeled, the character data is
probably in ASCII, but if the tape is IBM-labeled, the
character data is almost certainly in EBCDIC.
Use FCOPY to dump one or two blocks of data from the tape. If
the data is likely to be EBCDIC characters, then use EBCDICIN.
For example, if the tape was reported as "Vol 000001,IBM", you
could do this:
FILE L;DEV=TAPE;LABEL=000001,IBM;REC=-16384,1,U,ASCII
FILE LP;DEV=LP
FCOPY FROM=*L;TO=*LP;OCTAL;CHAR;EBCDICIN;SUBSET=,1
|
This reads one block from the tape, converts it to
ASCII, formats it as both octal and characters, and
prints it, telling you how big it is. The tape records may
be blocked, and examination of the data will
probably disclose a pattern of repetitions from which the
blocking factor can be deduced. This is
necessary more often with unlabeled tapes or IBM-format labeled tapes, which may not
have the HDR2 records that give the record and block size.
Once you know the format of the data, use FCOPY to copy the
data to where you want it--for example, to disk. Suppose that the
above tape is found to have blocks of 2640 bytes, consisting of
20 records of 132 bytes. You could do the following:
FILE LL;DEV=TAPE;LABEL=000001,IBM;REC=-132,20,F,ASCII
FILE IBMDATA;REC=-132,F,ASCII;DISC=12000,32
FCOPY FROM=*LL;TO=*IBMDATA;NEW;EBCDICIN
|
You need an estimate of the amount of data on the
tape. If you underestimate, the disk file fills
up and FCOPY terminates, leaving some data unread. If
you overestimate, you waste some disk
space, but you can reduce the amount wasted if you specify a
large number of extents (32 in the example).
| | | | | NOTE:
If you are translating data from EBCDIC to ASCII, use the
EXCLUDE option to ensure that "Packed Fields (comp-3)" are
not translated. For more information, refer to the SUBSET
function.
| | | | |
|