Re: Problem with JCL
On Wed, 31 Jan 2018 05:05:45 -0800, Gerhard Adamwrote: >Sorry, but how is this not just a standard condition code test? > Because the devil is in the details... OP said: "including the DSN allocations" Cheers, Jantje. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Problem with JCL
Thanks to all who have responded. I have decided to follow the route of having a step which will run a REXX exec to do the allocations for me. Far, far easier than any other solution I was considering :) Regards – Grant. In theory, there's no difference between theory and practice. In practice, there is. If you don't have time to do it right, when will you have the time to do it over? - John Wooden DTCC Internal (Green) -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tom Marchant Sent: 31 January 2018 13:53 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Problem with JCL ATTENTION! This email originated outside of DTCC; exercise caution. On Wed, 31 Jan 2018 05:17:42 -0800, Gerhard Adam wrote: >Why not simply make Part B and Part C, separate jobs and use IEBGENER to >submit them to the internal reader based on condition code? Or use INCLUDE with one or more members that have different content on different systems. Or use ReXX to perform dynamic allocation and invoke programs -- Tom Marchant -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Problem with JCL
On Wed, 31 Jan 2018 05:17:42 -0800, Gerhard Adam wrote: >Why not simply make Part B and Part C, separate jobs and use IEBGENER to >submit them to the internal reader based on condition code? Or use INCLUDE with one or more members that have different content on different systems. Or use ReXX to perform dynamic allocation and invoke programs -- Tom Marchant -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Problem with JCL
On 01/31/2018 07:45 AM, Jantje. wrote: On Tue, 30 Jan 2018 15:36:29 +, Ward Able, Grantwrote: I have a situation where I need to execute a single JCL procedure, but ONLY execute some steps (including the DSN allocations) for part B or part C, depending on the return code of part A. May I suggest you use dynamic allocation for that? I don't think there is any other way of achieving your requirement. Cheers, Jantje. I concur. Especially if you will be in a JES3 environment. As another poster commented, I also think JES3 "SETUP" will have a problem with the VOL= and UNIT= . Normally, when I do JCL like this, and it must execute in a JES3 environment, I use an IEFBR14 step to start that names the data sets (disp=new|mod) that IDCAMS will build in a following step. This IEFBR14 STEP has COND=ONLY. JES3 accepts that and doesn't fail the JOB with a JCL error. Your situation is one that I would have to experiment with, but I think you will need to run TSO in batch with REXX or CLIST using ALLOC/FREE. You may even have to invoke IDCAMS (LISTC) to get info that LISTDSI may not be able to provide. The requirement that this all be in a single JOB is *the* headache from where I sit. Regards, Steve Thompson -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Problem with JCL
Why not simply make Part B and Part C, separate jobs and use IEBGENER to submit them to the internal reader based on condition code? If they can't reside in a PDS, then make them instream data to be passed to the IEBGENER based on return code. Adam -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: Wednesday, January 31, 2018 5:11 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Problem with JCL Ward Able, Grant wrote: >I have a situation where I need to execute a single JCL procedure, but ONLY >execute some steps (including the DSN allocations) for part B or part C, >depending on the return code of part A. The problem I seem to be stuck with is >that in part B (STEP10 below) I have some datasets defined in the JCL with >UNIT=SYSDA and VOL=SER=XX. However, if STEPA.RC is not 12, then we are not >executing in an environment where VOL=SER=XX is available/mounted. I have >been told that I need to have this whole job as a single unit, so it can >execute in the different environments as necessary. Ouch that is a hard ugly one. Split up your jobs in separate jobs or try dynamic, but conditional allocations? Or insert steps to check for dsn, like this Clist example in a IKJEFT step: PROC 0 IF ('???.JCL') = OK THEN + DO WRITE DATASET FOUND SET = 0 END ELSE + DO WRITE DATA SET NOT FOUND SET = 4 END Use that RC to do your IF checking... >Is this feasible? Can it be achieved, Perhaps if there is a way to check the status of a VOLSER in a batch job. Good luck. If I were you, I had given that assignment to some young programmer... ;-) Groete / Greetings Elardus Engelbrecht -- 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: Problem with JCL
Ward Able, Grant wrote: >I have a situation where I need to execute a single JCL procedure, but ONLY >execute some steps (including the DSN allocations) for part B or part C, >depending on the return code of part A. The problem I seem to be stuck with is >that in part B (STEP10 below) I have some datasets defined in the JCL with >UNIT=SYSDA and VOL=SER=XX. However, if STEPA.RC is not 12, then we are not >executing in an environment where VOL=SER=XX is available/mounted. I have >been told that I need to have this whole job as a single unit, so it can >execute in the different environments as necessary. Ouch that is a hard ugly one. Split up your jobs in separate jobs or try dynamic, but conditional allocations? Or insert steps to check for dsn, like this Clist example in a IKJEFT step: PROC 0 IF ('???.JCL') = OK THEN + DO WRITE DATASET FOUND SET = 0 END ELSE + DO WRITE DATA SET NOT FOUND SET = 4 END Use that RC to do your IF checking... >Is this feasible? Can it be achieved, Perhaps if there is a way to check the status of a VOLSER in a batch job. Good luck. If I were you, I had given that assignment to some young programmer... ;-) Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Problem with JCL
Sorry, but how is this not just a standard condition code test? Sent from my iPhone > On Jan 31, 2018, at 4:45 AM, Jantje.wrote: > >> On Tue, 30 Jan 2018 15:36:29 +, Ward Able, Grant >> wrote: >> >> I have a situation where I need to execute a single JCL procedure, but ONLY >> execute some steps (including the DSN allocations) for part B or part C, >> depending on the return code of part A. > > May I suggest you use dynamic allocation for that? I don't think there is any > other way of achieving your requirement. > > Cheers, > > Jantje. > > -- > 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: Problem with JCL
On Tue, 30 Jan 2018 15:36:29 +, Ward Able, Grantwrote: >I have a situation where I need to execute a single JCL procedure, but ONLY >execute some steps (including the DSN allocations) for part B or part C, >depending on the return code of part A. May I suggest you use dynamic allocation for that? I don't think there is any other way of achieving your requirement. Cheers, Jantje. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Problem with JCL
On 2018-01-30, at 08:36:29, Ward Able, Grant wrote: > Previously posted to ISPL-List > As answered on ISPF-L (I'll welcome any corrections): ... And use a more imformative subject such as "JCL IF Statement". >> -Original Message- >> From: Ward Able, Grant >> Sent: Tuesday, January 30, 2018 8:13 AM >> >> Apologies for addressing this issue to the ISPF List - what would the correct >> list be? >> >> I have a situation where I need to execute a single JCL procedure, but ONLY >> execute some steps (including the DSN allocations) for part B or part C, >> depending on the return code of part A. The problem I seem to be stuck with >> is that in part B (STEP10 below) I have some datasets defined in the JCL with >> UNIT=SYSDA and VOL=SER=XX. However, if STEPA.RC is not 12, then we are >> not executing in an environment where VOL=SER=XX is available/mounted. I >> have been told that I need to have this whole job as a single unit, so it can >> execute in the different environments as necessary. >> An ENQ on any DSN mentioned will always be issued, regardless of IF or COND. Allocation will not be performed. In JES2, data sets mentioned in steps skipped by IF or COND need not exist and will not be created. JES3 setup may require that even data sets mentioned in steps skipped by IF or COND and their VOL and UNIT exist and are accessible. >> //STEPA EXEC PGM=BLAHBLAH >> // ... >> // ... >> //IFDR IF (STEPA.RC = 12) THEN >> //STEP10 >> // ... >> // ELSE >> //STEP50 >> // ... >> // ENDIF -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Problem with JCL
Previously posted to ISPL-List I have a situation where I need to execute a single JCL procedure, but ONLY execute some steps (including the DSN allocations) for part B or part C, depending on the return code of part A. The problem I seem to be stuck with is that in part B (STEP10 below) I have some datasets defined in the JCL with UNIT=SYSDA and VOL=SER=XX. However, if STEPA.RC is not 12, then we are not executing in an environment where VOL=SER=XX is available/mounted. I have been told that I need to have this whole job as a single unit, so it can execute in the different environments as necessary. Is this feasible? Can it be achieved, or do I have to split the parts B and C out into separate discreet bits of JCL? //STEPA EXEC PGM=BLAHBLAH // ... // ... //IFDR IF (STEPA.RC = 12) THEN //STEP10 // ... // ELSE //STEP50 // ... // ENDIF Regards - Grant DTCC Internal (Green) DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN