ESP Workload Automation

  • 1.  Automate Ad-hoc run jobs.

    Posted Feb 25, 2017 09:55 AM

    We have all the schedule and events are in place to run regular batches. But on daily basis we used to run adhoc request job from already available application thru ESP Event manager/workload manager . I am trying to automate these adhoc requests thru below steps. 

    1. Get the user request thru wob trigger. 

    2. Wob trigger runs an application(say name as Dummy app) that will get the adhoc job details from user file. 

    3. Now the Dummy App has all the details like adhoc Appl name, adhoc job name, schedule id and time. 

    4. Once all the required details are ready, adhoc job would be triggered from the dummy application.  I am trying to do this thru REXX ON/OFF And AJ commands. 

     

    Before attempting above steps have few questions on it. 

     

    1. Is it possible to submit other application jobs from one application, in my case, I am trying to run other applications jobs from dummy Appl.? 

    2. Can AJ REQUEST Command  be used to submit a job? 

    3. please suggest me that  would these steps help me to achieve my objective. 

     

    Thanks in Advance. 



  • 2.  Re: Automate Ad-hoc run jobs.
    Best Answer

    Broadcom Employee
    Posted Feb 28, 2017 07:36 AM

    Hello,

     

    Would suggest you read "Command Reference Guide" "ADHOC Command—Insert Ad-Hoc Workload into An Application" and see if it meets your requirement. If the jobs are defined, however not selected, this command can be used to submit them.

     

    Here are answers to your questions:

    1. Is it possible to submit other application jobs from one application, in my case, I am trying to run other applications jobs from dummy Appl.? 

    Yes, you can code commands in the dummy appl, which will submit the jobs from other appl.

    2. Can AJ REQUEST Command  be used to submit a job? 

    No, AJ REQUEST is used to request a job with REQUEST option, so that it will run. 

    3. please suggest me that  would these steps help me to achieve my objective. 

    Would need more detail: what's the status of the job before the user requests it? Is it selected? Is it failed?

    - If it's not selected, then ADHOC command should be used;

    - If it's selected and hasn't run yet, AJ READY and/or AJ DROPRES should be used;

    - If it's failed, AJ RESUBMIT should be used.

     

    Hope this helps,

     

    Lucy



  • 3.  Re: Automate Ad-hoc run jobs.

    Posted Mar 01, 2017 12:31 AM

    Thanks Lucy. Really appreciate it. 

     

    I will be using below lines to read and get the adhoc job name and adhoc  application name to submit it. 

     

     

    ADHOC APPL(applname.1) ADHLIST(jobname) 

    REXXON
    "ALLOCX DSN('CYB.REQUEST(ADHOC)') SH "
    if rc \= 0 then
    do
    "SE 'UNABLE TO ALLOCATE CYB.REQUEST(ADHOC)' U(*)"
    "REEXEC IN(2)"
    "EXIT"
    end
    address MVS "EXECIO * DISKR " ddname "(STEM INPUTREC. FINIS"
    j=inputrec.0
    /* read through the dataset line by line */
    /* insert job into application specified or default */
    do i = 1 to j
    parse upper var inputrec.i jobname applname .

    ADHOC APPL(applname.1) ADHLIST(jobname) 
    end
    "FREEX FILE(" ddname ")" 
    REXXOFF

     

     

    Will the below line allows me to run the job from particular application?  And generation number can be 1 always? 

    ADHOC APPL(applname.1) ADHLIST(jobname)

     

    All my adhoc jobs are not selected. 

     

    Thanks Again. 



  • 4.  Re: Automate Ad-hoc run jobs.

    Broadcom Employee
    Posted Mar 01, 2017 09:24 AM

    Glad to help.

     

    If you want to issue ADHOC for jobs in most current generation, "0" should be used, not "1".

     

    Lucy