Not DD statements, dynamic allocation. You can use bpxwdyn without needing to use assembler code, and you can use DYNALLOC (SVC 99) directly if you're writing assembler.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Billy Ashton [bill00ash...@gmail.com] Sent: Wednesday, December 30, 2020 4:24 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Using symbolic DD names Hi Lizette, as I noted originally, the vendor program uses control statements, where certain values are passed in on the control statement. These user-defined values drive the DD statement it is looking for. In my example, the table number is being passed in on a SYSIN control statement (it could be with the other parameters, like ....,TBL=01,...) , and so the program knows it needs to find DD statement TB01DAT. Since it is vendor code, I don't know what the do internally, but I suspect with assembler, you can build your own DD statement on the fly before you try to open a file. Billy ------ Original Message ------ From: "Lizette Koehler" <stars...@mindspring.com> To: IBM-MAIN@listserv.ua.edu Sent: 12/30/2020 3:55:32 PM Subject: Re: Using symbolic DD names >So the question becomes, can your Program handle a constantly changing DD Name? > >What would be the benefit from doing this? > >In Cobol you predefine (If I am allowed to use this word) the IO Section. >Which specifies the DD name - consider that hard coded. > >I am not aware of any language construct that allows for a DD name to be >randomly selected in a program. On z/OS > >I would be interested if anyone has an example. > >And yes Scheduling products can supply symbolics where native z/OS might now. > >Could you provide an example where your program when it executes would use a >random DD name in JCL? > >Lizette > > > >-----Original Message----- >From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of >Billy Ashton >Sent: Wednesday, December 30, 2020 12:22 PM >To: IBM-MAIN@LISTSERV.UA.EDU >Subject: Using symbolic DD names > >Hey folks! I have a vendor product program that looks for different DDnames >depending on the control statements passed into the program. Is there any way >to define a dynamic DD statement using JCL symbols? For example, I would love >to have //TB&tno.DAT to correspond to TB01DAT, TB14DAT, or TB67DAT if I use >SET TNO=01 or 14 or 67. > >Is such a thing possible? I tried using an instream proc definition and >INCLUDE MEMBER= that proc name, but that failed, and of course, I tried the >straight up JCL as above, and it failed. > >What do you all think? > >Billy > > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, send email to >lists...@listserv.ua.edu with the message: INFO IBM-MAIN > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN