On Mon, Sep 12, 2016 at 8:01 AM, Greg Shirey <wgshi...@benekeith.com> wrote:

> John,
>
> Wouldn't you have to reverse step 2 and step 1 of your job?   I don't
> think you could rename SOME.PDS.LOADLIB if the STC were still running.
> (Data set in use)
>

No. The first step of the job does not run at all until the DSN is DEQ'd
from the STC by it going down. With JCL, the ENQs for the all of the  DSNs
in all steps are done _before_ the first step starts. So the DISP=OLD in
the second step stops the first step from running if the STC is still up. I
put the IEFBR14 at the end of a job to hold the DSN for the duration of the
job (just a habit, not necessary in this case) because the DEQ for a DSN is
done by the initiator when the last step which references a given DSN
terminates (or is skipped). You could put a DD in the IDCAMS step itself
for the DSN with a DISP=OLD if you wanted to. Again, use of the DISP=OLD in
a latter step is more a habit on my part that an absolute necessity.



>
> Regards,
> Greg Shirey
> Ben E. Keith Company
>
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of John McKown
> Sent: Saturday, September 10, 2016 4:39 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: System Automation Question
>
> ​Sounds pretty decent to me. I might do it slightly differently.
>
> 1) FTP the new loadlib to z/OS with a new name (say SOME.PDS.LOADLIB.NEW)
> 2) FTP a z/OS job which does two things:
>     2a) Issues a F MODIFY,stcname,STOP (or whatever)
>     2b) submits a new job.
> 3) The job submitted by the the FTP'd job does:
>     Job 3 step 1 - IDCAMS to delete SOME.PDS.LOADLIB.OLD,
>                                           rename SOME.PDS.LOADLIB to
> SOME.PDS.LOADLIB.OLD
>                                           rename SOME.PDS.LOADLIB.NEW to
> SOME.PDS.LOADLIB
>     Job 3 step 2 - IEFBR14 allocation SOME.PDS.LOADLIB with DISP=OLD to
> stop job from running until STC shuts down (enq conflict)
>     job 3 step 3 - issue S STC to restart the STC - however it is you
> issue z/OS commands within a z/OS jobstream
>                         But not with a /*$VS,'S STC' in the job's JCL
> since that runs too soon
>
> This avoids your step #2 of "wait for the STC to terminate" because the
> job mentioned in my step 3 won't really start until the STC is down. I
> think this would be easier to accomplish since you can't really "wait until
> STC is down" in some manner without some outside (non z/OS standard)
> software.​
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
Unix: Some say the learning curve is steep, but you only have to climb it
once. -- Karl Lehenbauer
Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown

----------------------------------------------------------------------
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