The Sample Application

The Sample Application

This sample application simulates a fictitious bank (Cedar Bank) and demonstrates the major features of the .NET Framework and COMTI by retrieving customer account information using mainframe COBOL transactions by way of CICS or IMS. It also shows you how to call a COMTI Automation server from Web-based or other COM-based client applications. This sample application requires a live connection to a mainframe host environment. This sample application demonstrates:

  • How to call COMTI automation servers from a Windows-based application or from an ActiveX component written in Microsoft Visual Basic .NET or C#.
  • How to call COMTI automation servers from a client browser by using Visual Basic .NET and Active Server Pages (ASP).
  • How to use ActiveX Data Object (ADO) recordsets.

The Cedar Bank sample application includes everything to put COMTI and Visual Studio .NET to work for you. Included are the following:

  • Sample automation client applications, one written in each Visual Basic .NET and C#, along with the source code for these applications. (Instructions for compiling the code are given later in this chapter.)
  • Eight different COMTI components that you can use to create eight different automation servers (one for each of the eight supported mainframe models). Each exposes the same COM interface.
  • Sample COBOL transaction programs (TPs).

The following figure shows how COMTI is integrated with the .NET runtime environment, including interfaces to the mainframe environment.

.NET Runtime COMTI integration

The sample Automation client application uses the methods of a COMTI Automation server to run COBOL-based mainframe TPs. The sample Automation client sends parameters to and receives results from each TP by calling the methods of a COMTI Automation server (a COMTI component deployed in a COM+ application or MTS package) by way of the COMTI run-time environment.

The COMTI Automation server's interface contains two methods (getbal, and getaccts) that any COM-based client application (the Automation client) can call to retrieve bank account information using mainframe COBOL transactions by way of CICS or IMS.

  • The getbal method invokes the GETBAL COBOL transaction program on the mainframe, passes it a customer name and account number, and then returns the balance of the given account.
  • The getaccts method invokes the GETACCTS COBOL transaction program on the mainframe, passes it a customer name and PIN, and then returns a number of account records, each containing a set of fields with information about one of the customer's accounts. The account records are returned as an ActiveX Data Object (ADO) recordset that you can call from a COM-based client application or that you can connect to a data-bound control in Internet Explorer from a Web-based client application.

The following diagram shows the connections between a .NET Windows client application, the .NET Runtime, and the COMTI methods, which then call the mainframe transaction programs.

Direct client to .NET Runtime to COMTI to mainframe

The following diagram shows the connections between either a browser or a Windows client application, the .NET Server Web Service, the .NET Runtime, and the COMTI methods, which then call the mainframe transaction programs.

Connecting the Web to the mainframe

The Cedar Bank sample application is designed to use host mainframe connectivity over TCP/IP or SNA (APPC/LU 6.2). COBOL source code is supplied to run COMTI over a live mainframe connection. Use this COBOL source code to create GETBAL and GETACCTS mainframe TPs, and then install them in CICS or IMS on your mainframe. See the "Running Cedar Bank with a Live Mainframe Connection" topic later in this chapter.

Note   This sample application is based on the Cedar Bank Sample application that is installed with Host Integration Server 2000. The Cedar Bank sample application has been modified for the .NET Framework and requires not only Microsoft Host Integration Server 2000, but also Microsoft Visual Studio .NET as discussed later in this chapter.

The Cedar Bank Sample application supplied with Host Integration Server 2000 is programmed using Visual Studio version 6.0. The Host Integration Server 2000 documentation has complete information for the Cedar Bank sample application.

Previous  Next


Microsoft Corporation - Microsoft. Net Server Solutions for the Enterprise
Microsoft .NET Server Solutions for the Enterprise
ISBN: 0735615691
EAN: 2147483647
Year: 2002
Pages: 483

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net