Re: Using symbolic DD names

2021-01-10 Thread Binyamin Dissen
On Sun, 10 Jan 2021 08:18:10 -0600 Paul Gilmartin
<000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

:>On Sun, 10 Jan 2021 14:34:03 +0200, Binyamin Dissen wrote:
:>
:>>On Wed, 30 Dec 2020 19:21:52 + Billy Ashton wrote:
:>>
:>>:>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 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?
:
:>>If you create a member for each DD statement,
:
:>> // INCLUDE MEMBER=TAB
:
:>>should work fine. Or am I missing something?

:>Gee.  One might create a collection of JCLLIB members mapping the
:>Cartesian product of all possible values of all possible symbols.  Then
:>no such member need contain any symbol references.

There can be multiple iINCLUDE statements (with a dummy as a default). Not at
all a problem.

:>Seriously?  There's something wrong here.

:>I hate JCL!

That is a different issue.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2021-01-10 Thread Paul Gilmartin
On Sun, 10 Jan 2021 14:34:03 +0200, Binyamin Dissen wrote:

>On Wed, 30 Dec 2020 19:21:52 + Billy Ashton wrote:
>
>:>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 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?
>
>If you create a member for each DD statement,
>
> // INCLUDE MEMBER=TAB
>
>should work fine. Or am I missing something?
>
Gee.  One might create a collection of JCLLIB members mapping the
Cartesian product of all possible values of all possible symbols.  Then
no such member need contain any symbol references.

Seriously?  There's something wrong here.

I hate JCL!

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2021-01-10 Thread Binyamin Dissen
On Wed, 30 Dec 2020 19:21:52 + Billy Ashton 
wrote:

:>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 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?

If you create a member for each DD statement,

 // INCLUDE MEMBER=TAB

should work fine. Or am I missing something?

//BLIP  PROC
//BLIP1 EXEC PGM=IEFBR14
// INCLUDE MEMBER=TABN  
//  PEND
//S1 EXEC BLIP,SFX=05   
++BLIP  PROC
++BLIP1 EXEC PGM=IEFBR14
++ INCLUDE MEMBER=TABN  
IEFC653I SUBSTITUTION JCL - MEMBER=TABN05   
XXTABN05 DD DUMMY   

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-31 Thread Dana Mitchell
On Thu, 31 Dec 2020 10:02:14 -0600, Paul Gilmartin  wrote:
>I've used BPXWDYN( 'ALLOC RTDDN(DD) ...' ) similarly.  Stronger guarantee of
>uniqueness; less ease of identification.
>

Thanks, I like that.  Next time I'm in working on this, I'll change the ALLOC.  
 Since I originally wrote this, it seems like I revisit it occasionally, to add 
and remove bits of code to embellish various displays like RACF, Interlink, etc.

Dana

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-31 Thread Paul Gilmartin
On Thu, 31 Dec 2020 07:50:44 -0600, Dana Mitchell wrote:
>
>... snippet ...
> 
Thanks.  I fixated on the wrong thing.

>In this instance, I append zscreen to keep the DD names unique if this is used 
>more than once simultaneously in split screens.  
>
I've used BPXWDYN( 'ALLOC RTDDN(DD) ...' ) similarly.  Stronger guarantee of
uniqueness; less ease of identification.

Thanks again,
gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-31 Thread Dana Mitchell
On Thu, 31 Dec 2020 07:25:45 -0600, Paul Gilmartin  wrote:
>
>But my question remains, how does compound symbol TRAP.
>get populated?
>

This example was just a snippet from my TRAP exec, where it issues the passed 
TSO command and performs an ISPF view on the output.  
It simply gets populated via the outtrap function:

x = OUTTRAP('trap.','*','CONCAT')
 
In this instance, I append zscreen to keep the DD names unique if this is used 
more than once simultaneously in split screens.  

Dana

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-31 Thread Paul Gilmartin
On Thu, 31 Dec 2020 13:04:59 +, Seymour J Metz  wrote:

>ZSCREENI?
>
I stand corrected.  I glanced at my 4-year code too hastily.
Thanks.

But my question remains, how does compound symbol TRAP.
get populated?


>
>From:  Jeremy Nicoll
>Sent: Thursday, December 31, 2020 5:53 AM
>To: IBM-MAIN@LISTSERV.UA.EDU
>Subject: Re: Using symbolic DD names
>
>On Wed, 30 Dec 2020, at 22:59, Paul Gilmartin wrote:
>> On Wed, 30 Dec 2020 15:16:49 -0600, Dana Mitchell wrote:
>
>> >Address ispexec 'VGET (ZSCREEN) SHARED'
>> >ddname='$TRAP'zscreen
>> >'ALLOC FI('ddname') UNIT(3390) DSO(PS) RECFM(V B) LRECL(255) NEW DEL REU'
>> >'EXECIO 'trap.0' DISKW 'ddname' (FINI STEM TRAP.'
>> >
>> I'm mystified.  I've used very much the VGET as you wrote it to fetch an
>> entire screen image into a simple Rexx variable.
>
>You couldn't have done.  According to ISPF Dialog Developer's Guide and 
>Reference,
>zscreen is a 1-byte variable ...

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-31 Thread Seymour J Metz
ZSCREENI?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Jeremy Nicoll [jn.ls.mfrm...@letterboxes.org]
Sent: Thursday, December 31, 2020 5:53 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Using symbolic DD names

On Wed, 30 Dec 2020, at 22:59, Paul Gilmartin wrote:
> On Wed, 30 Dec 2020 15:16:49 -0600, Dana Mitchell wrote:

> >Address ispexec 'VGET (ZSCREEN) SHARED'
> >ddname='$TRAP'zscreen
> >'ALLOC FI('ddname') UNIT(3390) DSO(PS) RECFM(V B) LRECL(255) NEW DEL REU'
> >'EXECIO 'trap.0' DISKW 'ddname' (FINI STEM TRAP.'
> >
> I'm mystified.  I've used very much the VGET as you wrote it to fetch an
> entire screen image into a simple Rexx variable.

You couldn't have done.  According to ISPF Dialog Developer's Guide and 
Reference,
zscreen is a 1-byte variable containing:

  Logical screen number up to 32 screens (1-9, A-W)

--
Jeremy Nicoll - my opinions are my own.

--
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


Re: Using symbolic DD names

2020-12-31 Thread Jeremy Nicoll
On Wed, 30 Dec 2020, at 22:59, Paul Gilmartin wrote:
> On Wed, 30 Dec 2020 15:16:49 -0600, Dana Mitchell wrote:

> >Address ispexec 'VGET (ZSCREEN) SHARED'
> >ddname='$TRAP'zscreen
> >'ALLOC FI('ddname') UNIT(3390) DSO(PS) RECFM(V B) LRECL(255) NEW DEL REU'
> >'EXECIO 'trap.0' DISKW 'ddname' (FINI STEM TRAP.'
> >
> I'm mystified.  I've used very much the VGET as you wrote it to fetch an
> entire screen image into a simple Rexx variable.  

You couldn't have done.  According to ISPF Dialog Developer's Guide and 
Reference, 
zscreen is a 1-byte variable containing:

  Logical screen number up to 32 screens (1-9, A-W)

-- 
Jeremy Nicoll - my opinions are my own.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-31 Thread Peter Vels
Try this:

// EXPORT SYMLIST=*
// SET TNO=99  
//SUBMIT EXEC PGM=IEBEDIT  
//SYSPRINT DD SYSOUT=X 
//SYSINDD DUMMY
//SYSUT1   DD DATA,SYMBOLS=JCLONLY 
//INSIDE JOB   
//VENDOR EXEC PGM=IEFBR14  
//TB DD DUMMY  
// 
/* 
//SYSUT2 DD SYSOUT=(A,INTRDR)  
//

It's only a slight modification of Steve Smith's suggestion.  I added the 
EXPORT line and removed the & from the SET statement.

Peter

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-30 Thread Brian Westerman
We do this all the time in the Syzygy Automation Suite.  We typically scan the 
TIOT looking for any DDnames that start with SYZ* and if we find them we do 
different things based on what they are, also we allow SYZINnn and any number 
of SYSIN datasets which we dynamically create a DCB for inside the code and 
open them in the order they are numbered (0 through 99).  It's not hard.  

So there is a great benefit from it (for us).

Brian

On Wed, 30 Dec 2020 13:55:32 -0700, Lizette Koehler  
wrote:

>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  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 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


Re: Using symbolic DD names

2020-12-30 Thread Charles Mills
> I am not aware of any language construct that allows for a DD name to be 
> randomly selected in a program

Do you mean in COBOL?

I am not sure what you mean by "randomly selected" but if you mean 
"dynamically-constructed" and you are not limiting it to COBOL, then it is 
certainly trivial and common in assembler to move a dynamically constructed 
name into DCBDDNAM before the OPEN.

COBOL 6 has an interesting thing in that for SELECT local-name ASSIGN 
external-name that external-name can be the name of an environment variable 
that contains DSN(dataset.name) disp SPACE(space) etc. I do not know if it is 
possible to set an environment variable directly from COBOL, but you could 
certainly call out to a routine that did so. That would pretty much qualify as 
dynamic allocation from a COBOL program (without calling out to BPXWDYN or 
similar).

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Lizette Koehler
Sent: Wednesday, December 30, 2020 12:56 PM
To: IBM-MAIN@LISTSERV.UA.EDU
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  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 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


Re: Using symbolic DD names

2020-12-30 Thread Bernd Oppolzer

Am 30.12.2020 um 21:55 schrieb Lizette Koehler:

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


The C language on z/OS allows the DD name for input and output files to 
be constructed at runtime:


f = fopen ("dd:ddname", "r");

but the argument to fopen can be a variable, too.



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?


I have written a DB2 tool, where the results of several SQL statements 
are written to arbitrary DD names;

input control file lokes like this:

ddname1 := SELECT ...;

ddname2 := SELECT ...;

and so on ... the program is written in C, obviously;
the same ddname can be used later in the input stream to use the file 
again (for example to
trigger UPDATEs or INSERTs or DELETEs with the data fetched by the 
previous SELECT).


Kind regards

Bernd




Lizette


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-30 Thread Paul Gilmartin
On Wed, 30 Dec 2020 15:16:49 -0600, Dana Mitchell wrote:

>I do this frequently in REXX:
>
>Address ispexec 'VGET (ZSCREEN) SHARED'
>ddname='$TRAP'zscreen
>'ALLOC FI('ddname') UNIT(3390) DSO(PS) RECFM(V B) LRECL(255) NEW DEL REU'
>'EXECIO 'trap.0' DISKW 'ddname' (FINI STEM TRAP.'
>
I'm mystified.  I've used very much the VGET as you wrote it to fetch an
entire screen image into a simple Rexx variable.  But:
ddname='$TRAP'zscreen

... appears to be a straightforward Rexx assignment instruction, assigning to
the Rexx simple variable DDNAME the 5-character string '$TRAP' concatenating
the (several hundred character) string ZSCREEN.  I see nothing affecting the
compound symbol TRAP.  How does that get set?  Am I missing something?

I have long wished for an ISREDIT command to fetch a range of lines, or
all the NX buffer into a compound symbol, or LMPUT from a compound
symbol rather the absurdly cumbersome MULTX construct.  Why not?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-30 Thread Seymour J Metz
> I am not aware of any language construct that allows for a DD name to be 
> randomly selected in a program. On z/OS

All ethe way back to OS/360:

 OPEN FILE (file-expr) TITLE (expression);


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Lizette Koehler [stars...@mindspring.com]
Sent: Wednesday, December 30, 2020 3:55 PM
To: IBM-MAIN@LISTSERV.UA.EDU
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  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 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


Re: Using symbolic DD names

2020-12-30 Thread Seymour J Metz
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" 
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  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 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


Re: Using symbolic DD names

2020-12-30 Thread Paul Gilmartin
On Wed, 30 Dec 2020 13:55:32 -0700, Lizette Koehler wrote:
>
>And yes Scheduling products can supply symbolics where native z/OS might now.
> 
JCL Converter is brain-dead.  Symbolics should be recognized *everywhere*,
even when split over continuation lines.

>Could you provide an example where your program when it executes would use a 
>random DD name in JCL?
>
Not a DD name in JCL, but some ISPF Rexx functions supply generated
DDNames for spool files.  To copy them out, I need to
address ATTCHMVS 'IEBGENER PARM1 AltDDList'

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-30 Thread Billy Ashton
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" 
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  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 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


Re: Using symbolic DD names

2020-12-30 Thread Dana Mitchell
I do this frequently in REXX:

Address ispexec 'VGET (ZSCREEN) SHARED'
ddname='$TRAP'zscreen
'ALLOC FI('ddname') UNIT(3390) DSO(PS) RECFM(V B) LRECL(255) NEW DEL REU'
'EXECIO 'trap.0' DISKW 'ddname' (FINI STEM TRAP.'

Dana


On Wed, 30 Dec 2020 13:55:32 -0700, Lizette Koehler  
wrote:

>So the question becomes, can your Program handle a constantly changing DD Name?
>
>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.
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-30 Thread Lizette Koehler
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  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 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


Re: Using symbolic DD names

2020-12-30 Thread Steve Smith
JCL doesn't allow any symbol substitution in names or operation.  You can,
however, use anything in the wide wide world of programming to generate the
JCL and submit it.

But here's a nice, simple way to do it:
// SET =99
//SUBMIT EXEC PGM=IEBEDIT
//SYSPRINT DD ...
//SYSIN DD DUMMY
//SYSUT1 DD DATA,SYMBOLS=JCLONLY
//? JOB
//? EXEC
//TB DD ...
//
/*
//SYSUT2 DD SYSOUT=(A,INTRDR)
//

None of JCL's symbol rules apply, as it's just data when the symbols are
processed.

sas

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-30 Thread Paul Gilmartin
On Wed, 30 Dec 2020 19:21:52 +, Billy Ashton wrote:

>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 to correspond to TB01DAT, 
>TB14DAT, or TB67DAT if I use SET TNO=01 or 14 or 67.
>
ITYM "//TB"

>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.
>
But to no avail.  From somewhere in the JCL Ref.:
4. Do not use symbols to change the identifier field, name field, or 
operation field of a JCL statement.

>What do you all think?
>
o ObEmerson
o Doesn't this contravene Peter R's strict assertion that IBM documentation
  does *not* attempt to document what is *not* supported.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using symbolic DD names

2020-12-30 Thread R.S.

W dniu 30.12.2020 o 20:21, Billy Ashton pisze:
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 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?


It is impossible.

However similar things can be done using batch scheduler features.
For ControlM there are JSL and %%variables.
It is more or less as automated editor which produce JCL text just 
before it is submitted. All the %%variables have to be substituted at 
this time giving syntactically valid JCL, however some of %%var 
operations (like %%V1=%%ODATE-3) can be left in comment fields.

Other schedulers have similar facilities.

--
Radoslaw Skorupka
Lodz, Poland





==

Jeśli nie jesteś adresatem tej wiadomości:

- powiadom nas o tym w mailu zwrotnym (dziękujemy!),
- usuń trwale tę wiadomość (i wszystkie kopie, które wydrukowałeś lub zapisałeś 
na dysku).
Wiadomość ta może zawierać chronione prawem informacje, które może wykorzystać 
tylko adresat. Przypominamy, że każdy, kto rozpowszechnia (kopiuje, 
rozprowadza) tę wiadomość lub podejmuje podobne działania, narusza prawo i może 
podlegać karze.

mBank S.A. z siedzibą w Warszawie, ul. Prosta 18, 00-850 Warszawa,www.mBank.pl, 
e-mail: kont...@mbank.pl. Sąd Rejonowy dla m. st. Warszawy XII Wydział 
Gospodarczy Krajowego Rejestru Sądowego, KRS 025237, NIP: 526-021-50-88. 
Kapitał zakładowy (opłacony w całości) według stanu na 01.01.2020 r. wynosi 
169.401.468 złotych.

Jesteśmy administratorem twoich danych osobowych, które podałeś w związku z 
prowadzoną z nami korespondencją. Przetwarzamy te dane dla celów, które 
wynikają z przedmiotu korespondencji, w tym związanych z prowadzoną 
działalnością bankową.
Więcej informacji o tym jak chroniony i przetwarzamy dane osobowe znajdziesz w 
Pakietach RODO (w wersji polskiej i angielskiej), które są na www.mbank.pl/rodo


If you are not the addressee of this message:

- let us know by replying to this e-mail (thank you!),
- delete this message permanently (including all the copies which you have 
printed out or saved).
This message may contain legally protected information, which may be used 
exclusively by the addressee.Please be reminded that anyone who disseminates 
(copies, distributes) this message or takes any similar action, violates the 
law and may be penalised.

mBank S.A. with its registered office in Warsaw, ul. Prosta 18, 00-850 
Warszawa,www.mBank.pl, e-mail: kont...@mbank.pl. District Court for the Capital 
City of Warsaw, 12th Commercial Division of the National Court Register, KRS 
025237, NIP: 526-021-50-88. Fully paid-up share capital amounting to PLN 
169.401.468 as at 1 January 2020.

We are the controller of your personal data, which you provided in connection 
with correspondence with us. We process your data for purposes resulting from 
the subject of correspondence, including those related to the banking services.
More information on how we protect and process personal data can be found in 
the GDPR Packages (in English and Polish), which are on www.mbank.pl/rodo.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Using symbolic DD names

2020-12-30 Thread Billy Ashton
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 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