ESP Workload Automation

 View Only
  • 1.  Is it possible to future schedule a job so that it comes in on hold?

    Posted Feb 16, 2016 08:16 AM

    From time to time we get requests from programmers who want a job to come in on hold but only on a specific day.  For example, the request is sent on a Friday for Monday's run to come in on hold.  In this case, the job runs daily, so Friday's, Saturday's, and Sunday's runs need to complete as normal, Monday's run needs to come in on hold, and Tuesday's needs to run as normal, etc.

     

    Of course, we could wait until the job comes in to the schedule and place it on hold from within CSF or from within Workstation, but we would like to be able to future schedule holds.

     

    We do something similar for bypasses by simply adding "NORUN <Date> after the regular  run line.  Is there a similar way to do holds?

     

    Thanks!



  • 2.  Re: Is it possible to future schedule a job so that it comes in on hold?
    Best Answer

    Posted Feb 16, 2016 08:40 AM

    Hi,

    It is possible to use the JOBATTR function in a job definition. See if the example below will do what you need. The TODAY('xxxxx') can be modified with a variety of schedule statements..

     

    JOB DPRCCOD3                                    

       IF TODAY('FEB 23 2016') THEN JOBATTR HOLD    

       RUN DAILY                                    

    ENDJOB                      

     

    2cents                  



  • 3.  Re: Is it possible to future schedule a job so that it comes in on hold?

    Posted Feb 16, 2016 08:56 AM

    I was close. . . I was using an IF statement, but I was using an AJ command instead of JOBATTR like this:

     

    IF TODAY('FEB 23 2016') THEN DO 

    ESP AJ BR549X01 HOLD APPL(%ESPAPPL..%ESPAPGEN)

    ENDDO

     

    However, using JOBATTR did exactly what I needed.

    Thank you very much!



  • 4.  Re: Is it possible to future schedule a job so that it comes in on hold?

    Posted Feb 16, 2016 12:39 PM

    We also use the JOBATTR to hold jobs, but we add REASON operand (up to 28 characters)  and enter the Change Request #.

     

    JOBATTR HOLD REASON('123456789')

     

    This way when the Operators see the job in CSF and on HOLD, then have a point of reference to see why it was held.



  • 5.  Re: Is it possible to future schedule a job so that it comes in on hold?

    Posted Feb 17, 2016 07:22 AM

    Good response!  We too like to use "reasons" and SUS things in CSF for this very purpose!  this was a very helpful suggestion.