I believe this is an effort hat is easily handled by a scheduling software.

However, I had to do something like this, and I wrote all my SYSOUT from the JOB
to a dataset, then the last step would parse it to see if the next job could be
submitted. 

RC=04 was not always a good thing.  And the process had to account for new or
renamed members.  Or someone adding something to the dataset not expected.



Lizette


> -----Original Message-----
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
> Daniel S. Dalby
> Sent: Saturday, April 21, 2018 11:43 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Mass submit jcl
> 
> Hi Lizette,
> 
> My thought was that the poster could submit the members in alphabetic
> sequence.
> As the job was submitted it would tack on an additional step to the end to go
> through the submission library and submit the NEXT member IF the return code
> was zero.  Each step as they got submitted would add the additional step to
> indicate where it came from and what member the current JCL came from.  The
> last step would check if there is another member after this one in the
> library and submit it along with the additional step ... and so on until a
> non-zero return code is encountered or the last member is submitted.
> 
> As you suggested, a scheduler would be the best method but the original
> poster didn't say if they had one or not.
> I don't know if the new IBM SCHEDULE statements allow for return code
> checking in a submission chain.
> 
> Also, by sequentially submitting the jobs in alphabetical sequence and not
> submitting the next until the previous job has completed successfully, you
> won't get jobs running out of order.
> 
> DanD
> 
> "Lizette Koehler" <stars...@mindspring.com> wrote in message
> news:<0bd601d3d993$0e7d02d0$2b770870$@mindspring.com>...
> > Do you have a job scheduling software?  If not, then submitting in a
> specific
> > sequence will be tricky
> >
> > Are you at z/OS V2.3?  If so, JES2 now has some scheduling control
> > cards
> that
> > will allow you to do simple scheduling functions.
> >
> > Check on www.cbttape.org for scheduling functions.
> >
> >
> > If the jobnames are different, the when they hit the input queue they
> might run
> > out of order.
> >
> > If you provide more specific details, we might provide better answers
> >
> >
> > Lizette
> >
> >
> > > -----Original Message-----
> > > From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On
> > > Behalf
> Of
> > > Daniel S. Dalby
> > > Sent: Saturday, April 21, 2018 9:36 AM
> > > To: IBM-MAIN@LISTSERV.UA.EDU
> > > Subject: Re: Mass submit jcl
> > >
> > > <ss33ss...@gmail.com> wrote in message
> > > news:<6462565f-68ca-445b-9226-b25257e1e...@googlegroups.com>...
> > > > Is there any methods for submitting all the members in a pds in
> > > > order and
> > > do return code checking at the job level so that job b is depends on
> joba
> > > rc=0 etc
> > >
> > > ---
> > >
> > > You'd get better response if you submitted to the mailing list
> > > rather
> than
> > > posting to the newsgroup.  Fortunately some of us read from the
> newsgroup
> > > which contains both.
> > >
> > > Here's a challenge to yourself or anyone interested in playing for a
> > > few hours.  I'm busy this weekend otherwise I'd give it a try.
> > >
> > > Create a procedure "SUBNEXT" where you pass it a PDS/PDSE library
> > > name
> and
> > > the current member.  Write it in whatever language you are most
> comfortable.
> > > A CLIST or REXX could be used as the PROC could contain "//substep
> > > EXEC PGM=IKJEFT1A,PARM='%SUBNEXT &dsname &member'".
> > >
> > > The SUBNEXT program would allocate the library, create a member
> > > list,
> find
> > > the current member and check if another member follows, if so submit
> that
> > > member.
> > > The routine could dynamically allocate the INTRDR and using an
> > > ACB/RPL
> submit
> > > via PUT the JCL onto the internal reader and at the END of that
> > > input
> member
> > > add ...
> > > "//LASTSTEP EXEC SUBNEXT,DSNAME=dsname,MEMBER=mem,COND=(0,NE)".
> > >
> > > When using an ACB/RPL to write to the internal reader after you
> > > issue
> ENDREQ
> > > the RPLRBAR field will contain the 8 character job id, which can be
> > > used
> in
> > > any messages if you wish.
> > > It would be nice to have another step following the "SUBNEXT" step
> > > that issues a write to operator if SUBNEXT was NOT executed.  I
> > > guess that
> could
> > > be up to the user if they wanted that functionality.
> > >
> > > SUBNEXT would NOT be a mass submission of the PDS/PDSE but rather
> sequential
> > > submission of the members within that library.  By using COND=
> submission
> > > would STOP whenever a job does NOT work as expected (in this example
> > > the
> job
> > > does not end with a return code of zero.
> > >
> > > If nobody attempts this in the next few days, I'll give it a shot.
> > > I
> could
> > > find this useful for submitting a TEST job streams.
> > >
> > > Please post to the LIST if you give it a shot and successfully
> > > complete
> this
> > > tool.  I would like a copy.
> > >
> > > Thanks,
> > > DanD
> 
> ----------------------------------------------------------------------
> 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

Reply via email to