A more general solution... Let's say the job you want to tailor is PRODJOBA. It is a member in a JCL library.
Create a proc MODIFER that: - Accepts a symbol of what job to process - Queries the list to see if that job needs to be modified. - If no, just copies the job from the JCL library to the internal reader, or just submits it (how?) - If yes, reads the job from the JCL library, applies all the modifications, and then writes it to the internal reader Create a submitter job for each of jobs that need to be modified. For example: - Job SUBPRODA runs the proc MODIFER with symbol set to PRODJOBA - etc. Submit the submitter job (e.g. SUBPRODA) instead of the final job. If you don't want to have 2 jobs in the JCL library, or have a "submitter" and modified job, you could do it all in PRODJOBA. Just have the JCL you want to actually submit as instream data in the job, and it can submit to the same name as its own name. One hint: since you're tailoring the job, you are in full control of the syntax in the input "template". You can put markers in that aren't real JCL syntax, and then remove them in the tailoring process. This makes it easier to do the tailoring; you don't have to have completely JCL parsing logic -- you just look for specific strings. -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Steff Gladstone Sent: Wednesday, November 13, 2024 12:53 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Modifying JCL on the fly Ok. Let me make my question clearer. I am talking about modification before execution of the job-step begins. There is a list (either in a VSAM file or in common memory, and constantly changing) of batch jobs (actually the key would be jobname/stepname) that require some extra monitoring, which is implemented by adding an input file (created on the fly) and possibly adding some extra parameters to the PARM of the EXEC statement. This must be done before the job-step begins to execute. I hope this is clearer now. On Mon, 11 Nov 2024 at 17:11, Seymour J Metz <sme...@gmu.edu> 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 > > > > ---------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, send > > email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > ::DISCLAIMER:: > > ________________________________ > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. E-mail transmission is not > guaranteed to be secure or error-free as information could be intercepted, > corrupted, lost, destroyed, arrive late or incomplete, or may contain > viruses in transmission. The e mail and its contents (with or without > referred errors) shall therefore not attach any liability on the originator > or HCL or its affiliates. Views or opinions, if any, presented in this > email are solely those of the author and may not necessarily reflect the > views or opinions of HCL or its affiliates. Any form of reproduction, > dissemination, copying, disclosure, modification, distribution and / or > publication of this message without the prior written consent of authorized > representative of HCL is strictly prohibited. If you have received this > email in error please delete it and notify the sender immediately. Before > opening any email and/or attachments, please check them for viruses and > other defects. > > ________________________________ > > > > ---------------------------------------------------------------------- > > 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 > > > ---------------------------------------------------------------------- > 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