Hi,
thanks for the replies.
Here is the exact file description that I need to adhere to:
File Description:
A tape or disk may contain one or more files depending on the type of survey. Each file is started by a
number of "Reader Records" followed by data records and closed by an EOF statement in col 1-3 of the
final record.
A tape file is closed by one IBM file mark.
A tape must be closed by two IBM file marks.
I looked at your link but I am sorry to say I did not really understand the content. However I re-read your original post where you wrote "The logical EOF is in ASCII and can be read by an ordinary read. The physical EOF is an electronic mark on the tape that does not correspond to any of the 256 possible byte values. When you read a tape mark no data is transferred to memory. Instead the device returns status that indicates you have hit a tape mark."
I do not understand what the physical EOF mark is, if it does not correspond to any of hte possible byte values. Could you explain a little? Perhaps you ahve a link to some information on this kind of topic?
Based on your information I assume that for a tape drive to write a physical EOF mark I presume it does so by being told to do so, I.e. by being sent a SCSI command to do so.
I found this link:
http://home.comcast.net/~SCSIguy/SCS...si-summary.doc
Which details a table with this sequential access command defined:
SCSI – Sequential Access
Command Opcode Scu Command
WRITE FILEMARKS 10h mt { eof | weof } [ count ]
And also this link:
http://www.computerhope.com/unix/umt.htm
Which details the linux "mt" command a little more.
It seems that
==> mt -f /dev/nst0 eof
will write a eof mark
==> mt -f /dev/nst0 eof 2
will write 2 eof marks.
Their is also an weof option. I am not sure what the difference is, perhaps the are equivalent.
If I amend my software to write each file like this:
for file=1 to n
dd if=file_n bs=8000 cbs=80 of=/dev/nst0
mt -f /dev/nst0 eof
end
mt -f /dev/nst0 eof
I assume I should get the result I want. Does this sound ok?
The problem I have is that I have no standard compliant tape to reverse engineer or software to test my software against.
What do you think? Am I on the right track here? the mt command is written by Kai Makisara, I wonder if he might reply if I sent him such a "newbie" question on email?
Thanks,
Stvy