Skip to main content

I posted this question on another place - and Chris Glaser gave me some help

Tutorial or example for calling a URL and processing the response - Micro Focus︎ Visual COBOL User Discussions - OpenText Micro Focus Visual COBOL

- but suggested I re-post here.  I need to call an API from the ESODBCXA module.  Both the calling and called programs have been developed - and the API is written in C# and is deployed.

this might work - but it does a GET and I need to pump in a BODY in JSON

Tutorial or example for calling a URL and processing the response - Micro Focus︎ Visual COBOL User Discussions - OpenText Micro Focus Visual COBOL


#EnterpriseDeveloper
#EnterpriseServer
#EnterpriseSuite

I posted this question on another place - and Chris Glaser gave me some help

Tutorial or example for calling a URL and processing the response - Micro Focus︎ Visual COBOL User Discussions - OpenText Micro Focus Visual COBOL

- but suggested I re-post here.  I need to call an API from the ESODBCXA module.  Both the calling and called programs have been developed - and the API is written in C# and is deployed.

this might work - but it does a GET and I need to pump in a BODY in JSON

Tutorial or example for calling a URL and processing the response - Micro Focus︎ Visual COBOL User Discussions - OpenText Micro Focus Visual COBOL


#EnterpriseDeveloper
#EnterpriseServer
#EnterpriseSuite

Calling a REST API via POST - how to pass in parameters in JSON - Micro Focus︎ Visual COBOL User Discussions - OpenText Micro Focus Visual COBOL


Hi,

Can I ask you to clarify:

-On the other thread you mention "code is managed and built with Enterprise Developer",
I'd like to make of the scenario, are you using ES.NET regions for this?
Also, which Enterprise Developer/Server version are you on e.g. v9.0?

ESODBCXA is the generic one-phase commit for ODBC XA Switch module.
Can you advise:
-What kind of application code do you intend to use with ESODBCXA, e.g. JCL or CICS calling Managed COBOL?
-Do you want to use C# to directly call / use the ESODBCXA to do SQL work?

Regards,
Kim


Hi,

Can I ask you to clarify:

-On the other thread you mention "code is managed and built with Enterprise Developer",
I'd like to make of the scenario, are you using ES.NET regions for this?
Also, which Enterprise Developer/Server version are you on e.g. v9.0?

ESODBCXA is the generic one-phase commit for ODBC XA Switch module.
Can you advise:
-What kind of application code do you intend to use with ESODBCXA, e.g. JCL or CICS calling Managed COBOL?
-Do you want to use C# to directly call / use the ESODBCXA to do SQL work?

Regards,
Kim

we're on 8.0
I don't think we use ES.NET but I need to run that by our infrastructure guys - we have a C# program in the mix but that gets invoked by inserting a PROC into JES
I would rather not write a C# program - but if I have to I will - if I can call the API from COBOL that would be preferable
thank you for the rapid response


we're on 8.0
I don't think we use ES.NET but I need to run that by our infrastructure guys - we have a C# program in the mix but that gets invoked by inserting a PROC into JES
I would rather not write a C# program - but if I have to I will - if I can call the API from COBOL that would be preferable
thank you for the rapid response

Hi,
I recommend you to confirm what kind of ES region is used.

If you are using Native ES or ES.NET regions in both cases you would ideally want to a have a XA Switch defined with your region that uses the ODBC module. Then JCL/COBOL programs can use that to perform SQL work.
You have not mentioned if your ES region us using a XA Switch yet.

If you use an ES.NET region: Then I believe C# (or any .NET Framework language) can be used with the region as ES.NET is designed to work with .NET Framework.

If you use a Native ES region:
Then the JCL/COBOL will be able to use that Switch module to perform SQL work. I am not sure if a C# can make use of that as it is likely running outside of the cassi/SEP runtime container. It will be useful to understand exactly how the JCL invokes the C#.

I recommend you to review these documentation pages:
Title: Using XA-compliant Resources (XARs)
URL: www.microfocus.com/.../BKCACACONFU020.html

Title: Generic One-phase Commit for ODBC RM Switch Module
URL: www.microfocus.com/.../GUID-D493E658-3915-44B5-8C94-F3AB9FCBB9B6.html