 |
In this Issue
 |
President's Letter |
 |
Using the HostBridge API for COBOL |
 |
Demo Dates |
 |
Tech Notes |
|
President's Letter
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:
EXEC HBI command option(arg)…
An example of such a statement would be:
EXEC HBI RUN
INBOUND (WS-INBOUND)
OUTBOUND (WS-OUTBOUND)
END-EXEC.
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.
PROGRAM-ID.
RUNCEMT.
.......
.......
SELECT CEMTRQST ASSIGN TO CEMTRQST.
.......
.......
WORKING-STORAGE SECTION.
01 WS-INPUT PIC X(80).
01 WS-XML-OUTPUT PIC X(30000).
PROCEDURE DIVISION.
.......
.......
READ CEMTRQST INTO WS-INPUT.
.......
.......
EXEC HBI RUN
INBOUND (WS-INPUT)
OUTBOUND (WS-XML-OUTPUT)
END-EXEC.
DISPLAY WS-XML-OUTPUT.
.......
.......
Below is an example of the JCL to run the sample code.
//MSCRCLOS JOB (ACCT#),’BATCHCICSCOBOL’, CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID //*============================================================== * //* CEMT CLOSE THE MSCRFILE IN REGION CICSE AND PRINT THE RETURNED //* XML DOCUMENT //*============================================================== * //STEP1 EXEC PGM=HBIBCICS,REGION=0M, // PARM=’RUNCEMT,CICSE’ <<PROGRAM-ID,CICSPPLID //STEPLIB DD DSN=HBRAPI.LOADLIB,DISP=SHR // DD DSN=CICSTS22.CICS.SDFHEXCI,DISP=SHR //SYSOUT DD SYSOUT=* //CEMTRQST DD * HB_TRANID=CEMT&HB_DATA=SET FILE(MSCRFILE) CLOSE DISABLE /*
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).
Demo registration |
 |
 |
If you are available on either of the dates below, register for an online demonstration of the latest HostBridge features.
|
|
 |
|