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