
HostBridge Newsletter: Volume 3, Number 3
In this Issue
HostBridge has primarily been used by customers to access CICS resources from middle-tier clients or server-based applications. Often, they use HostBridge to make these resources available as Web services in a Service-Oriented Architecture. On occasion, a customer will want to invoke HostBridge from other Web-based applications using our LINK interface or using Websphere MQ. Recently, however, a customer wanted to invoke the services of HostBridge from the COBOL code of their batch applications. This required something new.
Customer requests have a way of becoming personal challenges to us. To meet this particular challenge, we developed an API that allows you to execute HostBridge from within your COBOL code. As an example, your nightly batch jobs can collect real-time information from your CICS applications and include that information in reports or whatever else you choose. This newsletter presents and overview of this API.
Thank you very much for your interest in HostBridge Technology. Let us know how we can help you solve your CICS integration problems.
Russ Teubner
Founder & CEO
Using the HostBridge API for COBOL
The HostBridge API for COBOL allows you to create simple or complex COBOL program(s) which can be used to execute CICS tranasactions and/or HostBridge process automation scripts. While most organizations think of using HostBridge to allow non-mainframe programs to access CICS, our customers pointed out that they have skilled COBOL programmers and wanted the opportunity to use HostBridge to facilitate intra-mainframe integration. Typical uses for the API might include,
* Writing service programs that can process any CICS Resource (transactions, programs, files, storage queues) or HostBridge automation scripts
* Executing IBM-supplied CICS transactions such as CEMT (open/close files, newcopy programs, etc.) for uninterrupted data flows providing 24x7 availability of CICS resources
* Running existing CICS transactions or COMMAREA programs without changes to existing applications and without closing files or shutting down CICS
* Developing systems to process data files and provide “automated” live feeds into existing CICS applications for production usage or data recovery
* Writing programs to run repetitive CICS processes and create end user reports
* Creating testing environments to logically control regression testing of CICS applications
* Developing batch or online access to external (or internal) Web Service sites (e.g., postal address correction, credit card validation, etc.)
The API allows COBOL programs to call HostBridge services using a set of “EXEC HBI” statements. These statements are similar to the EXEC CICS statements familiar to any CICS programmer and thus easy to incorporate into COBOL programs. The general format of an API command is EXECUTE HBI (or EXEC HBI) followed by the name of the required command, and possibly by one or more options, as follows:
![]()
An example of such a statement would be:

The following sample code shows how to use the RUN command from a Batch COBOL program to execute the CICS CEMT transaction with HostBridge. In this case, the program is executing the request string that is read from an input file.

Below is an example of the JCL to run the sample code.

For organizations with critical business processes tied to batch or CICS COBOL programs, HostBridge allows you to include real-time CICS application data. The EXEC HBI command format makes the API simple for COBOL programmers to use.
For more information, call us at 1-866-XML-CICS (965-2427).
This column seeks to answer common technical questions. If you have any specific questions you want answered or have ideas for questions you might like to see here, send them to
Q1. How do I find the expiration date for my license ?
A1. HostBridge issues a message at startup with the expiration date. The messages are stored in a HostBridge message (SYSOUT) file named HBROUT. (The TDQUEUE name for HBROUT is HBRO.) Check the contents of this file for version information as shown in the example below.
20060526 160821.220 CICS HBR$MAIN HostBridge Version 5.0
20060526 160821.224 CICS HBR$MAIN CICS SYSID/APPLID: CICS/CICS
20060526 160821.224 CICS HBR$MAIN System CPU ID: 000001
20060526 160821.684 CICS HBR$MAIN License key: $-*S0D*#0A8-IJ-11CO
20060526 160821.686 CICS HBR$MAIN License key expires 1/1/2040 (MM/DD/YYYY)
20060526 160821.687 CICS HBR$MAIN License key accepted
Q2. Concerning the HostBridge API for COBOL, can I extract BMS field values from a HostBridge XML document without using EXEC HBI EXTRACT MAP?
A2. Yes, by using the EXEC HBI EXTRACT FIELDS statement. However, the fields will need to be defined in working storage using the field names as they would appear in the XML document.