z/OS Connect Enterprise Edition

z/OS Connect

z/OS Connect

Truly RESTful APIs to and from your IBM Z mainframe

 View Only
  • 1.  Creating API that can start a batch job and return data to API

    Posted Wed November 04, 2020 04:08 PM

    Hello,
        I have an application manager that wants to have an API that would trigger a batch job, then process a few files and return data.  Is it possible to have a batch job triggered via an API call?  Or would we have to have a CICS program that would accept the API request and submit a batch job and then respond back via CICS to the API?  Finally, are there any examples?

    Thanks in advance,



    ------------------------------
    garrett shaw
    ------------------------------


  • 2.  RE: Creating API that can start a batch job and return data to API

    Posted Thu November 05, 2020 10:09 AM
    ​Hi,
    Several ways it could be  done. One we looked at and got working was to use the MQ service provider and batch trigger monitor. So client calls API which in our test put a dummy msg to MQ which triggered a batch job. The batch job could then do it's processing and on completion make an outboud API call back to the client.


    ------------------------------
    Steve
    ------------------------------



  • 3.  RE: Creating API that can start a batch job and return data to API

    Posted Fri November 06, 2020 10:32 AM
    Steve, 
         Thanks for that ideal.  I didn't think of using MQ.  Great Suggestion!


    ------------------------------
    garrett shaw
    ------------------------------