On Wed, Feb 10, 2016 at 6:08 PM, Lester, Bob <[email protected]> wrote:
> Hi Folks, > > OK, it's only Wednesday, but.... > > Wouldn't it be nice if you could code: > > //SOMEDD DD DSN=SOME.PDS.DSN,DISP=SHR > > ...and it would read all the members in order? Maybe even any order > you specify? > > Maybe (ducking!) like it works with GDGs when you specify the base > only? > > Am I crazy before Friday? > > Thanks! > BobL > > ​Well, most of the time when a DD is coded like that, it means that the program involved is most likely going to be using BPAM to process separate members (like COBOL with copybooks or HLASM with COPY or macros). So, unlike GDGs, the access method would need to have special coding. In particular, when doing an OPEN with a DCB which has DSORG=PO, then the "system" could not do your processing. So, the BSAM/QSAM access method would need to do something like "if I open a DCB with DSORG=PS, and the DSN is actually PO, then set up to read each member in order". But wait! There is a problem There is a _lot_ of code which already does an OPEN of a PO data set with a DCB with a DSORG=PS in it. In fact, that is a _documented_ way to read the directory of the PDS as if it were a data sets. And this process even works with PDSE libraries. Well, I think this should explain why what you are desiring is actually impossible. It would destroy existing code, horribly. Perhaps a new JCL format? //SOMEDD DD DSN=SOME.PDS.DSN(*),DISP=SHR which could lead to other "wildcards" such as SOME.PDS.DSN(A*) to get everything which starts with A. Or SOME.PDS.DSN(*A) for all member which _end_ in A. Or SOME.PDS.DSN(*A*) for members which have an "A" in the anywhere. Now we're cooking with fire! But wait! There's more! How about making the "pattern" be a "glob" ( https://en.wikipedia.org/wiki/Glob_(programming) ) for even better pattern matching. OK, we're using a gas range with an hibachi. And lastly, for a plasma flame crowd, let's go all the way and use EREs! (Extended Regular Expressions). Now all we need to determine is _when_ to generate the list of member names? I would suggest at OPEN time. The next thing that somebody would want is some sort of way to determine when the program started reading a new member and what the member name is that we just start (are currently) reading is. -- The man has the intellect of a lobotomized turtle. Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
