I got a question asking for recommendations on how to write a COBOL
application (on z/OS) to act as an HTTP client. That is, the COBOL program
makes an outbound HTTP request, provides some input data, and receives some
data back. The data format is arbitrary -- could be XML, could be just
simple strings.

Further assumptions: there's only Enterprise COBOL (compiler) and base z/OS
(including any standard and no charge features). Also, there are
significant bonus points awarded for high service quality attributes (RAS,
security, performance, etc.) "It broke!" is not adequate diagnostic
information if something fails, like the network or authentication to the
remote HTTP server. :-)

The same method could be used with Enterprise PL/I programs without any
material differences.

Anyway, with those conditions, here's the list of options I came up with:

1. Java application written using standard java.net HTTP client logic and
JZOS record conversion classes. Invoked as a JZOS job step.
2. Same as #1, but invoked via COBOL INVOKE.
3. CBT tape 556 (REXX HTTP client sample).
4. Via cURL for z/OS, part of the z/OS Ported Tools.

Options #2 and #4 are currently my favorite (again, given these
restrictions). Along the lines of #1 and #2 there are probably Perl and
Python avenues as well.

Anybody got any better (or at least different) ideas?

Yes, I know this is rather easy in CICS Transaction Server (EXEC CICS
WEB ...), for example.

- - - - -
Timothy Sipples
IBM Consulting Enterprise Software Architect
Based in Tokyo, Serving IBM Japan / Asia-Pacific
E-Mail: [EMAIL PROTECTED]
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to