And if you really need variable behavior requiring complex logic at
execution time that is beyond the limited capability of JCL, the
simplest solution is batch execution of a scripting language that
supports dynamic allocation and I/O, like Rexx, or perhaps one of the
scripting languages in the UNIX environment -- either containing the
complete step logic, or just as a front end to dynamically allocate some
files before invoking some program. If the variable part needed in the
JCL is just the choice of an input file or an output file, the simplest
solution may just be to use batch REXX steps with the REXX statements to
copy data between the variable file names and fixed file names used by
the program steps in the job. If you need conditional execution of job
steps that is beyond the capability of JCL, it's possible to put that
logic in a utility program that is executed in a prior step to set a
condition code that may be used to execute or skip a following step.
There are many such solutions to get around the fact that JCL is not a
programming language and is static at execution time. The tricky part
is to also design into such job streams an ability to properly indicate
failures and allow for restarting the job appropriately in event of a
failure, as job and restart managers that only look at JCL won't
understand how to handle such jobs.
JC Ewing
On 11/11/24 9:11 AM, Seymour J Metz wrote:
Either way, it's before the job executes. I read the original post as
requesting changes during execution.
For changes prior to executions, there are many good options. As usual, the
devil is in the details, and it's impossible to judge without knowing what OP
really wants.
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Allan
Staller <00000632b4c7ca99-dmarc-requ...@listserv.ua.edu>
Sent: Monday, November 11, 2024 10:04 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Modifying JCL on the fly
Caution: This email did not originate from George Mason’s mail system. Do not
click links or open attachments unless you recognize the sender and know the
content is safe.
Classification: Confidential
OOPs! Exit 4 may be Simpler, not similar....
-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
Allan Staller
Sent: Monday, November 11, 2024 8:36 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Modifying JCL on the fly
[CAUTION: This Email is from outside the Organization. Unless you trust the
sender, Don’t click links or open attachments as it may be a Phishing email,
which can steal your Information and compromise your Computer.]
Classification: Confidential
JCL has already been converted. Text units can be added/deleted as needed
(again, very similar to dynamic allocation.
EXIT4 is (possibly) similar.
When I actually did this at a former employer, EXIT6 needed to be modified.
HTH,
-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
David Spiegel
Sent: Monday, November 11, 2024 8:11 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Modifying JCL on the fly
[CAUTION: This Email is from outside the Organization. Unless you trust the
sender, Don’t click links or open attachments as it may be a Phishing email,
which can steal your Information and compromise your Computer.]
Hi Allan,
Why is JES2 Exit 6 better than Exit 4 for this purpose?
Regards,
David
On 11/11/2024 08:59, Allan Staller wrote:
Classification: Confidential
IEFUSI is too late in the process. I suggest JES2 EXIT6 (or EXIT26?) depending
on the JES2 Environment.
In both cases, you must be prepared to manipulate the INTERPRETER internal text
(very similar in concept to dynamic allocation).
HTH,
-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On
Behalf Of Steff Gladstone
Sent: Sunday, November 10, 2024 2:51 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Modifying JCL on the fly
[CAUTION: This Email is from outside the Organization. Unless you
trust the sender, Don’t click links or open attachments as it may be a
Phishing email, which can steal your Information and compromise your
Computer.]
What is the best way of modifying JCL after the job has been
submitted, in order to conditionally add another DDNAME to a JOB STEP? Or
perhaps adding parameters to the PARM string on the EXEC statement.
We were thinking of using the IEFUSI exit point, allocating a file
dynamically before the main program of the job-step is attached. I
gather there are also JES2 exits (are they simple exits or the more
flexible exit
points?) that are appropriate to the task and would be interested to hear
advice from other system programmers.
Two other questions: are these exits specified in the PARMLIB or via some other
mechanism? And what happens if the exit fails in some way? What action does
the system take?
Thanks in advance,
Steff Gladstone
...
--
Joel C Ewing
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN