> I'm trying to prevent 2 batchjobs from running in parallel. 
> On the first step in each job is at DD-statement: 
>  
> //STOPFIL  DD  DSN=PROD.EDI.SENDEDI.STOPFIL,    
> //             DISP=(OLD,PASS)                  
>  
> And is seems to work ? sometimes?. 
> This morning it failed, and I don?t know why?.. 
> 
The ENQ is released after the last step that references the data
set name.  "PASS" has no effect.  So, put the DD statement in the
last step of the job, or, even add a last step:

    //STOPSTEP EXEC  PGM=IEFBR14,COND=(0,LE)
    //STOPFIL  DD  DSN=PROD.EDI.SENDEDI.STOPFIL,    
    //             DISP=MOD

"COND=(0,LE)" prevents the step's actually executing; "MOD" may
help satisfy JES3 setup requiremenents.  If the data set doesn't
exist you may need to add UNIT and/or SPACE.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

  • Enqueue Frank Allan Rasmussen
    • Re: Enqueue Paul Gilmartin

Reply via email to