IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this forum will no longer be available. More details available on our FAQ.
Topic
  • 6 replies
  • Latest Post - ‏2019-01-15T07:49:06Z by Zuiken
Zuiken
Zuiken
15 Posts

Pinned topic Call a REST API from a COBOL application

‏2019-01-10T12:24:52Z |

Hi guys,

the general idea of this topic is Call a REST API from a COBOL application scenario this is one of the IBM Z Trial Team demos where everything is already setup by IBM (check attach) and I already made the SMP/E installation and start 1 server API Requester.

I would like to know what next I need to do to build this scenario and tested on our installation step by step if it's possible....

Our company wants to test product before buy it and we never work with zOSConnect before... so we have no idea how to create this scenario.

 

Best regards

Attachments

  • Alan Hollingshead
    Alan Hollingshead
    58 Posts
    ACCEPTED ANSWER

    Re: Call a REST API from a COBOL application

    ‏2019-01-11T15:43:17Z  
    • Zuiken
    • ‏2019-01-10T15:41:56Z

    Hi Alan,

    thanks for your answer ok so there a lot to read and to understand to make the magic happens.

    What do you mean with that I will need to update it to make a call to the communication stub ¿?.. do you mean the COBOL application ¿?... this is not transparent for the current COBOL applications ¿?.. also i don't understand what is a communication stub...

     

    Best regards

     

    Hi Tony, @Zuiken,

     

    Yes, that is correct. You will need to update your COBOL application to call the communicate stub that will send the request to the API requester feature of z/OS Connect EE (that in turn will forward the request to your JBoss application).

    The topic that describes an example of how to do this is:

    https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_develop.html
    which is part of the scenario
    https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_intro.html
     

    Kind regards,

    Alan Hollingshead

    z/OS Connect EE

     

  • Alan Hollingshead
    Alan Hollingshead
    58 Posts

    Re: Call a REST API from a COBOL application

    ‏2019-01-10T13:55:36Z  

    Hello Tony @Zuiken,

     

    The steps to build a scenario similar to the one used in the IBM Z Trial Team demos, are described in the knowledge center https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_intro.html
    Looking at the diagram on this page, (ignoring the reference to CICS region which will be corrected in a refresh of the knowledge center) your COBOL application will be the "Client application" shown in the LPAR on the left of the diagram.

     

    Kind regards,

    Alan Hollingshead

    z/OS Connect EE

  • Zuiken
    Zuiken
    15 Posts

    Re: Call a REST API from a COBOL application

    ‏2019-01-10T14:42:56Z  

    Hello Tony @Zuiken,

     

    The steps to build a scenario similar to the one used in the IBM Z Trial Team demos, are described in the knowledge center https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_intro.html
    Looking at the diagram on this page, (ignoring the reference to CICS region which will be corrected in a refresh of the knowledge center) your COBOL application will be the "Client application" shown in the LPAR on the left of the diagram.

     

    Kind regards,

    Alan Hollingshead

    z/OS Connect EE

    Hi Alan,

    we don't have IMS in our installation and according to this scenario it's used we have DB2, CICS TS and CICS Gateway.

    In general what they want is:

    Route the API call request issued by the client application (COBOL application) from the z/OS Connect EE Server (that I guess is a Server type "API Requester") to an request endpoint that can be a JBOSS Server for example (this is open systems - NOT in mainframe) that will execute a JAVA application and access a DB also in Distributed platform and bring it back the result to the z/OS Connect EE Server in mainframe to continue the COBOL application process in z/OS.

    Is this possible ¿? I mean we can connect the z/OS Connect EE server with a endpoint that is not in Mainframe (JBOSS Server).

    best regards

    Updated on 2019-01-10T15:23:05Z at 2019-01-10T15:23:05Z by Zuiken
  • Alan Hollingshead
    Alan Hollingshead
    58 Posts

    Re: Call a REST API from a COBOL application

    ‏2019-01-10T15:26:58Z  
    • Zuiken
    • ‏2019-01-10T14:42:56Z

    Hi Alan,

    we don't have IMS in our installation and according to this scenario it's used we have DB2, CICS TS and CICS Gateway.

    In general what they want is:

    Route the API call request issued by the client application (COBOL application) from the z/OS Connect EE Server (that I guess is a Server type "API Requester") to an request endpoint that can be a JBOSS Server for example (this is open systems - NOT in mainframe) that will execute a JAVA application and access a DB also in Distributed platform and bring it back the result to the z/OS Connect EE Server in mainframe to continue the COBOL application process in z/OS.

    Is this possible ¿? I mean we can connect the z/OS Connect EE server with a endpoint that is not in Mainframe (JBOSS Server).

    best regards

    Hello Tony @Zuiken,

     

    Yes, your scenario is supported.

    Consider the following diagram:

    In the diagram, your COBOL client application is the z/OS application shown on the left. You will need to update it to make a call to the communication stub and onto z/OS Connect EE.  From our previous discussion, your z/OS Connect EE server is correctly configured to include the API requester feature. The RESTful endpoint in the API provider box in the diagram is your JBOSS server and can be on any platform including any distributed platform.

     

    The scenario I referred to in my previous response can be followed to see what steps are needed to create your scenario. Simply replace references to IMS or zOS application with your COBOL application, and the RESTful endpoint with your JBoss server.

     

    Kind regards,

    Alan Hollingshead

    z/OS Connect EE

  • Zuiken
    Zuiken
    15 Posts

    Re: Call a REST API from a COBOL application

    ‏2019-01-10T15:41:56Z  

    Hello Tony @Zuiken,

     

    Yes, your scenario is supported.

    Consider the following diagram:

    In the diagram, your COBOL client application is the z/OS application shown on the left. You will need to update it to make a call to the communication stub and onto z/OS Connect EE.  From our previous discussion, your z/OS Connect EE server is correctly configured to include the API requester feature. The RESTful endpoint in the API provider box in the diagram is your JBOSS server and can be on any platform including any distributed platform.

     

    The scenario I referred to in my previous response can be followed to see what steps are needed to create your scenario. Simply replace references to IMS or zOS application with your COBOL application, and the RESTful endpoint with your JBoss server.

     

    Kind regards,

    Alan Hollingshead

    z/OS Connect EE

    Hi Alan,

    thanks for your answer ok so there a lot to read and to understand to make the magic happens.

    What do you mean with that I will need to update it to make a call to the communication stub ¿?.. do you mean the COBOL application ¿?... this is not transparent for the current COBOL applications ¿?.. also i don't understand what is a communication stub...

     

    Best regards

     

  • Alan Hollingshead
    Alan Hollingshead
    58 Posts

    Re: Call a REST API from a COBOL application

    ‏2019-01-11T15:43:17Z  
    • Zuiken
    • ‏2019-01-10T15:41:56Z

    Hi Alan,

    thanks for your answer ok so there a lot to read and to understand to make the magic happens.

    What do you mean with that I will need to update it to make a call to the communication stub ¿?.. do you mean the COBOL application ¿?... this is not transparent for the current COBOL applications ¿?.. also i don't understand what is a communication stub...

     

    Best regards

     

    Hi Tony, @Zuiken,

     

    Yes, that is correct. You will need to update your COBOL application to call the communicate stub that will send the request to the API requester feature of z/OS Connect EE (that in turn will forward the request to your JBoss application).

    The topic that describes an example of how to do this is:

    https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_develop.html
    which is part of the scenario
    https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_intro.html
     

    Kind regards,

    Alan Hollingshead

    z/OS Connect EE

     

  • Zuiken
    Zuiken
    15 Posts

    Re: Call a REST API from a COBOL application

    ‏2019-01-15T07:49:06Z  

    Hi Tony, @Zuiken,

     

    Yes, that is correct. You will need to update your COBOL application to call the communicate stub that will send the request to the API requester feature of z/OS Connect EE (that in turn will forward the request to your JBoss application).

    The topic that describes an example of how to do this is:

    https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_develop.html
    which is part of the scenario
    https://www.ibm.com/support/knowledgecenter/SS4SVW_beta/scenarios/ims_apiReq_intro.html
     

    Kind regards,

    Alan Hollingshead

    z/OS Connect EE

     

    Hi Alan,

    thanks for your clarification on this matter I will continue with the test.

    I already try the scenario to call an API from a CICS zOS Application through zOS Connect EE.

    I will inform any advance.

     

    Best regards