I don't know how to open the data set in such a way, nor do I see why you
need to do so. Suppose there are 16 volumes in the data set and each volume
has 16 extents. Your DCB has a DDNAME=WHATEVER. Your DD statement for
WHATEVER points to the data set name. You OPEN the DCB. Your DEB that will be
constructed has 256 extent entries in it, with the first 16 pointing to the UCB
for the first of the 16 volumes, the second set of 16 extent entries in the
DEB all point to the UCB for the second of the 16 volumes, etc. You use EXCP
to read this file. You construct your own MBBCCHHR in the IOB before doing
the EXCP. You can put any value you want into the M byte. If you put a value
between X'00' and X'0F' you will use one of the first 16 extent entries in
the DEB and thus access volume 1. Etc. Whenever you want to go from volume(n)
to volume(N+1) you will need a new M value, as also you will if you move
from extent(x) to extent(x+1) within the same volume.
The reason that you need to is that when using EXCP or BSAM, then OPEN
only gives you access to one volume at a time. When you extend a dataset
using EOV and the secondary allocation needs to be on a different
volume, either because there is no space or because you've got 16
extents on the current volume, then the DCB is "moved" to the next
volume and the DEB now has only one extent, which is the new extent on
the new volume. Using BSAM or EXCP you don't get a DEB with extents in
it from multiple volumes. So to read data from a previous extent you
need to go back and with a seperate DCB open the previous volume.
Also, you can have up to 255 volumes can't you? So in other words you
can have more than 256 extents in total, so a 1 byte M isn't enough. For
that reason alone you'd need multiple DCBs.
Anyhow. The mechanism I'm using is to have one DCB per volume, as per
the description in the section "Using BSAM or EXCP for Random I/O to a
Multivolume Data Set" in "DFSMSdfp Advanced Services". In that section
it says "If you open a BSAM or EXCP DCB for a multivolume data set, OPEN
gives your program access to only one volume at a time" and this is
exactly what I see.
The title "Using EXCP for Random I/O to a Multivolume Data Set"
describes precisely what I'm trying to do, and indeed the method works
just fine, except for this one case of not getting the right volume when
I try and open volume 2 of a 3 or more volume set when the dataset is
declared DISP=NEW.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html