HP3000-L Archives

May 1995, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Randy Medd <[log in to unmask]>
Reply To:
Randy Medd <[log in to unmask]>
Date:
Thu, 4 May 1995 08:34:17 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (78 lines)
Marshall I. Medoff ([log in to unmask]) wrote:
> Help!
 
> I have a file created on a Unix machine that I need to read on my
> MPE/iX 5.0 machine.  The file is on a DDS Tape.  It was written using
> a specific application program not using tar, cpio or dd.  The logical
> record is 61 bytes with the 61st byte being a line feed (0Ah).  I have
> tried everything in my arsenal (COBOL) to read this tape.  Can anyone
> offer a suggestion as to what settings to use for file equations, file
> open options, and file access options?  I am also not afraid to use
> POSIX if someone were to offer a suggestion in that direction.
 
To divine the tape's format, use:
 
  :FILE T;DEV=TAPE;REC=-8192,,U,BINARY   {assuming 8192 bytes is big enough}
  :FCOPY FROM=*T;TO=;CHAR;HEX;SUBSET=0,1
 
This will dump the first two tape _blocks_, not records.  If, as you
say, the apparent record format is 60 bytes followed by a new-line,
this should be evident here.  The main question is how many such
records appear in each block.
 
To demonstrate, I wrote a little program to write two 1220 (20*61)
byte blocks to the DDS drive on our HP9000.  Here's the FCOPY output,
from a reading on our HP3000:
 
HP31900A.05.02 FILE COPIER (C) HEWLETT-PACKARD CO. 1990
 
*T RECORD 0 (%0, #0)
0000: 3132 3334 3536 3738 3930 3132 3334 3536 1234567890123456
0008: 3738 3930 3132 3334 3536 3738 3930 3132 7890123456789012
0010: 3334 3536 3738 3930 3132 3334 3536 3738 3456789012345678
0018: 3930 3132 3334 3536 3738 3930 0A31 3233 901234567890.123
0020: 3435 3637 3839 3031 3233 3435 3637 3839 4567890123456789
0028: 3031 3233 3435 3637 3839 3031 3233 3435 0123456789012345
0030: 3637 3839 3031 3233 3435 3637 3839 3031 6789012345678901
0038: 3233 3435 3637 3839 300A 3132 3334 3536 234567890.123456
<snip>
0250: 3637 3839 3031 3233 3435 3637 3839 3031 6789012345678901
0258: 3233 3435 3637 3839 3031 3233 3435 3637 2345678901234567
0260: 3839 300A                               890.
 
*T RECORD 1 (%1, #1)
0000: 3132 3334 3536 3738 3930 3132 3334 3536 1234567890123456
0008: 3738 3930 3132 3334 3536 3738 3930 3132 7890123456789012
0010: 3334 3536 3738 3930 3132 3334 3536 3738 3456789012345678
0018: 3930 3132 3334 3536 3738 3930 0A31 3233 901234567890.123
0020: 3435 3637 3839 3031 3233 3435 3637 3839 4567890123456789
0028: 3031 3233 3435 3637 3839 3031 3233 3435 0123456789012345
0030: 3637 3839 3031 3233 3435 3637 3839 3031 6789012345678901
0038: 3233 3435 3637 3839 300A 3132 3334 3536 234567890.123456
<snip>
0250: 3637 3839 3031 3233 3435 3637 3839 3031 6789012345678901
0258: 3233 3435 3637 3839 3031 3233 3435 3637 2345678901234567
0260: 3839 300A                               890.
EOF FOUND IN FROMFILE AFTER RECORD 1
2 RECORDS PROCESSED *** 0 ERRORS
 
The offsets in the first column are in hex, thus the block length can
be determined from the last line in each block as $260+2 (610 decimal)
words, 1220 bytes.  If your tape is blocked like mine, you'll either
have to read entire blocks and then unblock in your program or cheat
and read it using:
 
  :FILE T;DEV=TAPE;REC=-122,10,F,BINARY
 
This way, you can at least get most of the deblocking done by the file
system - you'll only have to split each 122 byte record into two
pieces to get the original format.
 
--
-------------------------------------------------------------
Randy Medd                           email: [log in to unmask]
Telamon, Inc.
492 Ninth Street, Suite 310          voice: 510-987-7700
Oakland, CA 94607                      fax: 510-987-7009
-------------------------------------------------------------

ATOM RSS1 RSS2