AutoSys Workload Automation

  • 1.  How to create a job - dynamicaly - in code.   

    Posted Apr 16, 2019 02:45 PM

    on the mainframe when a person types SUB on the command line in TSO – the file referenced is submitted to the Internal Reader – and if it’s proper JCL – the Job runs

     

    …..I know how to do this in Unix

     

    on the mainframe when a proper schedule is set up and loaded – in the Jobtrac application -  JobTrac submits the jobs to the Internal Reader – and if it’s proper JCL – the Job runs

     

    …..my understanding is that an application called AutoSys can do this in Unix  - I do not know how to do this or how AutoSys works

     

    there are many occasions in our applications where we create JCL (jils)  on the fly and submit it to the Internal Reader – from both the batch and CICS regions ( and visa versa )       

     

    …..I do not know anyone who knows how to do this in Unix



  • 2.  Re: How to create a job - dynamicaly - in code.   

    Broadcom Employee
    Posted Apr 16, 2019 04:02 PM

    Hi, 

     

    I'm not sure exactly what you're asking.  AutoSys can submit a job request to Jobtrac and jobtrac will return the exit code for that job.  If Jobtrac is not in the picture, then AutoSys could use either Autosys connect option to submit JCL on the mainframe or there is a z/OS agent that can submit JCL stored on the mainframe.

    A third option is to FTP to the internal reader directly.  That will submit the JCL stored locally, but does not track the execution of the job.  

     

    If there is another use case you are thinking of, please let us know.

     

    Regards,

    Mike



  • 3.  Re: How to create a job - dynamicaly - in code.   

    Posted Apr 16, 2019 04:22 PM

    Hi Mike

     

    English is a poor choice for communicating . . .

     

    what I outlined is a capability on the IBM Mainframe – Autosys is not there

     

    what I wonder about is / does that capability – exist in Autosys – on Unix ? – Jobtrac is not there

     

    the question is : can I from my C++/C#/JAVA/pickyourfavoritelangauge  program in Unix – command Autosys to do something

     

    is there an “API” to Autosys from code on Unix  ?

     

    we have an army of functions on the mainframe that create JCL for the Mainframe – on the fly – dynamically – literally 1000’s of jobs per day

     

    we are considering moving off the mainframe/jobtrac  and onto Unix /Autosys

     

    is there a way to create a JIL, submit it to Autosys and have Autosys run it – on the fly – dynamically – on Unix – from an application program

     

    1000’s of times per day, 100’s of different types of jobs each dynamically generated by frequency and need

     

    Thanks!

    P.



  • 4.  Re: How to create a job - dynamicaly - in code.   

    Broadcom Employee
    Posted Apr 17, 2019 09:55 AM

    Hi,

     

    OK.  from z/OS, the Java and C++ API will not be available as the Autosys SDK is not supported on that platform.  There is however a set of restful web services that you can use.  You can use the language of your choice to call the web service or there is a ported version of curl that is available as well.  The documentation on the web services can be found at https://docops.ca.com/ca-workload-automation-ae/11-4-2/en/reference/ae-web-services 

    I believe you will need to be logged onto support connect to access this portion of the doc.

    Here is a quick example of starting a job named test with a comment:

    curl --insecure -u mike:mikepassword -H "Content-Type: application/json" --data '{"jobName":"test","comment":"reason for sending event"}' -X POST https://AEHostName:9443/AEWS/event/start-job

     

    On the *nix platform, you will have web services, plus the Java, C++ SDK as well.  With the SDK you can create any object (jobs, machines, resources,...), control them (start,terminate,...) and retrieve job run information.  The doc for that is shipped in the Documentation directory when you install the product.  You can also install just the SDK from the iso as well.  There is a full functional CLI available as well, so if you want to just create a file with the job definitions, you could run the "jil" command to import them without having to write additional code.

     

    Regards,

    Mike