Hi again skippy and slade,
I have another suggestion, similar somewhat to slade's
but not using the 'dynamic allocation' since I am not
familiar with that, and I think that if you have a file
that is on multiple volumes and you just use a volume that
is not the first, you will get an error since it's not the first volume of the file. (an open error with a S0C1)
Estimate the amount of records that fit on a volume of the dataset that you are referring to.
(use whatever tape management facility that you have to
find out the amount of blocks that are on a volume, divide
the blocksize by record length for the amount of records
in a block, and records on volume = (recs/block) * blocks).
Estimate the maximum amount of records that would be on the file and allocate that amount of datasets in your jcl
with a descriptive format like dataset.v1, dataset.v2, etc...
In your program set up a counter and write out the estimated amount of records (minus a few for good measure)
to each dataset saving the first key (i.e. acct#) and last key. Display the amount of datasets written with the keys of each.
This will take time to set up, but will make subsequent processing quicker. If you get a lot of key specific requests this might be worthwhile for you. Or if you know the dasd limit for each dataset based on the record count you could set this up to divide up this large multi volume tape dataset into many smaller dasd datasets.
Good luck.
random act of goodness and kindness will
make the world a better place for all.
![[spin] [spin] [spin]](/data/assets/smilies/spin.gif)
shloimyb