On Fri, Apr 6, 2018 at 12:50 PM, Frank Swarbrick < frank.swarbr...@outlook.com> wrote:
> I'm pretty sure the answer to this is no (at least not easily), but can't > hurt to ask. > > The following, of course, works: > //PARMS DD DISP=SHR,DSN=PROD.APPLIB.PARMS(ABC) > > Is there some way I could specify a DD concatenation where the system > would search the DD's in order until it found a named member? > > The following is NOT what I am looking for: > //PARMS DD DISP=SHR,DSN=EMER.APPLIB.PARMS(ABC) > // DD DISP=SHR,DSN=PROD.APPLIB.PARMS(ABC) > > This would not work for my use case, because 1) it requires that the > member name exists in both libraries, and 2) even if they did both exist, > it would concatenate the values from both, rather than just from the first > one. > > Thanks, > Frank > > You did not indicate a language. For HLASM, I like this system macro: IEPRMLB ref: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ieaa900/iea3a9_REQUEST_READMEMBER_option_of_IEFPRMLB.htm This is a macro to which you supply a DD name, a MEMBER name, and other parameters such as a buffer area. In response, it will find and read that member into the buffer for you. The only restriction is that the DSNs in the concatenation must be RECFM=FB,LRECL=80. If you don't like that, then you could have an IEBCOPY step to do something like: //COPYMEM EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSIN DD * COPY I=INDD,O=OUTDD S M=MEMBER /* //INDD DD DISP=SHR,DSN=dsn1 // DD DISP=SHR,DSN=dsn2 //OUTDD DD DSN=&&TEMPDS,DISP=(NEW,PASS), // LIKE=dsn1,SPACE=(CYL,(10,10,100)) //* //MYSTEP EXEC PGM=MYPGM //MYDD DD DISP=SHR,DSN=&&TEMPDS(member) //* OTHER PARTS OF THE JOB Of course, you could also use the "historic" way by using BPAM and the FIND or BLDL macro. FIND is good for a single member and setting up the DCB to read it using BSAM (not QSAM). BLDL is better if you want to find a list of members. There is also the newer DESERV macro. ref: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.idad500/find.htm FIND ref: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.idad500/bldl.htm BLDL ref: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.idad500/d5032.htm DESERV -- We all have skeletons in our closet. Mine are so old, they have osteoporosis. Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN