HostBridge Technology logospacer Enabling CICS for eBusiness
  Products       News       Partners       Support       FAQs       Resources      
 
 
In this Issue
bullet President's Letter
bullet Using the HostBridge API for COBOL
bullet Demo Dates
bullet 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.

Photo of Russ TeubnerThank you very much for your interest in HostBridge Technology. Let us know how we can help you solve your CICS integration problems.

Signature for Russ Teubner
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).


News iconDemo registration
spacer  spacer If you are available on either of the dates below, register for an online demonstration of the latest HostBridge features.
bullet Tuesday, June 20 at 11:00 a.m., Central Time
bullet Thursday, July 13th at 11:00 a.m., Central Time

News iconTech Notes
spacer  spacer
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 questions@hostbridge.com
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.
  
Copyright © 2006, HostBridge Technology. All rights reserved.