StoreEver Tape Storage
Showing results for 
Search instead for 
Did you mean: 

How To Read block Length in a File With in a tape Cartridge ??

Occasional Contributor

How To Read block Length in a File With in a tape Cartridge ??

Please guide me to solve this problem.

i have a Tape cartridge in which there are, for instance, some data stored in following manner.
There are total of 3 files and 160 blocks.

1:there are 3 files in the cartridge.
2: each file have different number of blocks.
For example,
File 1 have 50 blocks .
file 2 have 60 blocks and
File 3 have 50 blocks.

Now probelm is that, i want to read data in fixed blocks.
for example,
First bock 1 in file 1.
block 2 of same file 1 and son on.

currently i am using ReadFile and other ASPI apis to read data and they are working fine. But they are not keeping track of blocks .
they reads data according to the input buffer size which user provides to them.
i want to track data block with in a cartridge but not logical blocks of Tape Drive.

after i get block length of each block with in a file i can do following;
i can ask user to seek at which block with in a file. moves my index to that block and than read next asked block.

So please help me in this scenario ..

best regards

harry d brown jr
Honored Contributor

Re: How To Read block Length in a File With in a tape Cartridge ??

Simple, next time you create a tape with this kind of "structure" (if you can call it that), then provide an INDEX of the tape so you know what you are trying to do!

Who creates tapes with block sizes that aren't documented, and I'm talking about the number of bytes in a block??

Wouldn't it be easier to just RESTORE the files and MANIPULATE them there off of disk??


(1) WHAT OS are we talking about here?

(2) What LANGUAGE??

(3) What commands??

live free or die
Live Free or Die