| ||||||
Search Microsoft.com for: |
Chapter 9 - Accessing Legacy Applications and DataOn This Page
This chapter describes how you can use Microsoft development tools and production software packages to make legacy applications and data available to Web applications based on Internet Information Server 4.0 (IIS). Identifying StrategiesTo employ Web technology to best advantage, an enterprise must make its business applications and data easily accessible—over the Internet or a company intranet—to its employees, key business partners, and the public. This goal is often difficult to achieve because mission-critical data is stored in host-based file systems and relational databases on IBM mainframes or AS/400 computers (estimates run as high as 80 percent for many large corporations and government agencies). Delivering large amounts of legacy data to a wide audience has always been problematic because:
This chapter outlines four strategies for accessing applications and data in MVS (mainframe) and OS/400 (AS/400 minicomputer) systems running within SNA (Systems Network Architecture) environments. You can:
Connecting to SNAEach of the legacy access strategies discussed in this chapter requires connections to IBM host computers through SNA. To understand how each strategy is implemented, you need a basic understanding of how the SNA environment is constructed, how to connect to SNA resources, and how to exploit these resources. The SNA EnvironmentSNA is IBM's architecture for designing and implementing computer networks. To communicate user data over SNA, a session must be established between two Logical Units (LUs), one on the host system and the other on the client system. Because LU 6.2 is a peer-to-peer protocol, either the mainframe host or the client can initiate a session. By using this protocol, computers running Windows NT Server 4.0 can participate in the SNA environment and gain access to legacy host environments including transaction processing (TP) monitors, VSAM and AS/400 files (both flat and unstructured), and database data structures, such as DB/2 data tables.
Figure 9.1 The SNA environment Connecting with MS SNA ServerYou can use SNA Server 4.0 to connect to the SNA environment from Windows NT 4.0 and IIS. SNA Server translates Windows NT Server 4.0 communications to LU 6.2.
Figure 9.2 SNA Server Connects Windows NT to SNA Developing and Deploying under Windows NT and IISWith SNA Server LU 6.2 capabilities, you can develop and deploy applications that access the legacy environment from the Windows NT side of the connection.
Integrating IIS and Legacy ApplicationsFor years, IBM has encouraged its customers to code their business logic into programs that are separate from their terminal access logic. Many Information Services (IS) organizations have responded by coding their business rules into TP programs that execute under CICS or IMS. Gaining access to these programs on the host side from the Windows NT environment can open up the business rules for an entire application, such as inventory control or budgeting, creating new opportunities for distributed applications. Using tools and techniques to access business logic offers significant advantages over methods such as "screen-scraping" data from terminal emulation programs because:
The COM Transaction IntegratorThe Microsoft COM Transaction Integrator for CICS and IMS (COM TI) is a technology for integrating legacy TPs running on mainframes with Web application and transaction processes running in the Windows NT environment. COM TI reduces the effort required to develop applications integrating COBOL (COmmon Business Oriented Language) programs running on mainframes with Automation clients running Windows NT Server, Windows NT Workstation, Windows 95, or any other computer that supports Automation. Specifically:
Figure 9.3 COM TI is a proxy for the mainframe. Functional Overview of the COM Transaction IntegratorThe following list summarizes how COM TI gains access to CICS applications and integrates data returned from CICS TPs with Internet Information Server through ActiveX Data Objects (ADO) and MTS.
COM TI runs under Windows NT, not on the SNA host. Its processing takes place on a computer running Windows NT Server, and does not require any new executable code to be installed on the mainframe, or on the desktop computer that is running the Internet browser. COM TI communicates through SNA Server and uses standard communication protocols (for example, LU 6.2 provided by Microsoft SNA Server version 4.0) to communicate between the computer running Windows NT Server and the mainframe TP. COM TI Development ScenariosThe following two scenarios illustrate how the COM TI environment can be used to develop applications that integrate TPs with ASP. Scenario One: Integrating Legacy TP Data Using COM Transaction IntegratorThis scenario illustrates how to connect a Windows NT–based Web site to an existing COBOL TP. Suppose you want to dynamically add content from a legacy database running under CICS on an IBM mainframe computer to a Web application running under IIS. You can begin by using ASP to interpret user requests and format the data returned by the mainframe application. Next, you can use COM TI to develop a component that will process the method calls from the IIS environment and the mainframe environment. This scenario involves six main steps:
Step 1: Configuring COM TI To develop a COM TI component, you must meet the following system requirements:
Additionally, the following COM TI components must be installed:
The component builder is installed as an add-in to Microsoft Visual Basic 5.0, and does not need to be installed on the same system as the other components. Developers who are not using Visual Basic 5.0 can use the component builder as a stand-alone tool. Step 2: Defining Required Methods and Parameters To accomplish this step:
If you have changed the data type mapping in the COBOL code, there are two more actions required in this step:
Step 3: Writing the Application To accomplish this step:
If the existing mainframe TP is to be modified, do one of the following:
Step 4: Testing the Application If the mainframe TP is unchanged, the TP does not require testing. If the TP has been modified, then the COBOL program should be tested independently to ensure that it runs correctly in its own environment. Test the new application as follows:
Step 5: Deploying Application Components To deploy the client-side of the application, the following software components must be installed on each production computer:
Step 6: Maintaining the Application As changes are made to the mainframe TP program, do one or more of the following, as appropriate:
What if the Required Mainframe TP does not Exist?In this case, you must modify steps 2 and 3 of the scenario by developing a TP to run under CICS on the mainframe host. In step 2, use the COM TI component builder to:
In step 3:
Scenario Two: Extending Transactions with COM TIWhen deployed in the Windows NT Server environment, COM TI can extend MTS transactions to include mainframe TPs running under CICS and IMS. A developer can use each of the following steps to connect a Windows NT–based Web site to an existing COBOL TP program for the purpose of making legacy data available to ASP. In this scenario, additional tasks are needed in order to extend MTS transactions to the mainframe-based transactions under the control of CICS. Step 1: Configuring COM TI To develop the COM TI object, you must meet the following system requirements:
Additionally, the following COM TI components must be installed (for descriptions of each of the components, see Scenario One):
Step 2: Defining Required Methods and Parameters To make the mainframe TP data available to IIS, perform the following tasks:
If you have changed the data type mapping in the COBOL code, there are two more actions required in this step:
Step 3: Writing the Application To accomplish this step:
Step 4: Testing the Application If the mainframe TP is unchanged, it does not require testing. If the TP has been modified, then the COBOL program should be tested independently to ensure that it runs correctly in its own environment. Test the new application as follows:
Step 5: Deploying Application Components Each of the following applications must be installed on the production computer before you deploy the client side of the application:
Step 6: Maintaining the Application If you change the mainframe TP application, you must do at least one of the following:
Using COM TI with IMSCurrent versions of COM TI do not support transactional semantics (also known as a two-phase commit) under the IMS subsystem. However, you can access an IMS/DB database transaction through a CICS subsystem front-end TP program. That is, if the mainframe environment supports CICS transaction processing against IMS/DB, you can extend MTS transactional semantics to the IMS/DB database. In this case COM TI provides the same services as any other TP running under CICS. If you do not require transactional semantics, and just want to gain access to your data, you can access IMS directly. Gaining Access to Legacy File DataThe following section describes how you can incorporate legacy file systems into your Web applications by employing a data provider to files at the record level and move the data to the IIS environment. Legacy File Data and IISTo develop Web applications that deliver data stored in VSAM and AS/400 files, you need to be able to gain access to VSAM and AS/400 files from the Windows NT environment. You can do this by making the data available to data consumer applications running under ASP:
Gaining Access to VSAM and AS/400 files with OLE DB and ADOThe OLE DB Provider for AS/400 and VSAM (Data Provider) is the first application to make record-level mainframe VSAM and AS/400 files systems available to ASP applications. The Data Provider makes it possible for consumer ASP applications to gain access to the mission-critical data available in those file systems. The Data Provider ships with Microsoft SNA Server 4.0, Windows NT Client for SNA Server 4.0, and the SNA Server SDK 4.0. For more information about developing ASP applications, see Chapter 5, "Developing Web Applications." The Data Provider and the Demand for Legacy File DataMicrosoft released a beta-test version of the OLE DB Provider for AS/400 and VSAM in the summer of 1997, and the Microsoft SNA site received over 600 registrations and download requests during the first four weeks that the beta test kits were available. This response is not surprising. There are over 400,000 AS/400 computers and about 30,000 mainframe computers deployed world-wide. Some run database management systems, but virtually every one of them stores information in VSAM data sets, and nearly every AS/400 hundred site stores data in conventional file structures—all accessible with the Data Provider. Functional Overview of the Data ProviderThe OLE DB Provider for AS/400 and VSAM (Data Provider) comprises two core components:
The following list summarizes the uses of the Data Provider:
Capitalize on Development with the OLE DB/DDM DriverThe Data Provider makes it possible to integrate unstructured legacy file data with data in the Windows NT environment.
Scenario: Using the Data Provider to Gain Access Host FilesWith the Data Provider, you can gain access to file data on an IBM host from a Windows NT–based Web application. Suppose that you want to add content from a legacy file stored on an IBM mainframe or AS/400 computer to an ASP application running under IIS. ASP can be used to interpret user requests and format the return of data to the user via Web pages. The Data Provider can process calls from the IIS environment and pass data returned from the mainframe environment to IIS. This scenario requires six main steps:
Step 1: Configuring the Data Provider To develop an application using the Data Provider, you must meet the following system installation requirements:
Additionally, the following packages must be installed and configured:
Step 2: Defining Application Requirements To accomplish this step:
Step 3: Writing the Application To accomplish this step:
Step 4: Testing the Application Test the new application to make sure that:
Step 5: Deploying Application Components Before deploying the application, the following packages must be installed on each production computer:
Step 6: Maintaining the Application If you modify the ASP scripts, you need to re-test the application using the following guidelines:
Replicating Legacy DatabasesMuch of the data stored in systems resides in relational databases. In addition to gaining access to legacy data in place on the host, you can replicate database tables from a legacy application to SQL Server. Why Replication?Legacy database replication is a conversion process that copies, reformats, and migrates database tables for use in relational databases running under Windows NT 4.0. Using data replicated from a legacy database, developers and systems engineers can:
Replicating DB2 Tables using the Host Data ReplicatorThe HDR (Host Data Replicator) is a database replication software product that copies pre-defined data from IBM DB2 database tables to Microsoft SQL Server database tables. It can do so on demand, at a scheduled time, or according to a recurring schedule. HDR has the capability to reverse the process as well, replicating SQL Server tables for use in a DB2 database. HDR is composed of the data replicator service (a Windows NT operating system service) and Data Replicator Manager (a Windows NT operating system application for administration). The Data Replicator Manager has a user interface similar to those used by SQL Enterprise Manager and the scheduling portions of SQL Executive. The HDR performs bi-directional full refresh replication. A complete "snapshot" of the source table is copied into the target database table. The target table has all its records overwritten each time replication occurs. Replication TypeThe Host Data Replicator performs bi-directional replication with full refresh. A complete "snapshot" of the source table is copied into the target database table using either BCP (when copying to Microsoft SQL Server) or ODBC "inserts." All of the records of the target table are overwritten each time replication occurs. Optionally, you can append data to the end of the existing table provided you do not change the table schema. The following section outlines the types of replication supported by HDR. Data Processing and Filtering:
Scheduling
Statistics
Security The Data Replicator Manager prompts the administrator to supply a valid Microsoft SQL Server account and password each time it establishes a connection to a Data Replicator Service. If a correct account and password are not provided, the Data Replicator Manager closes the connection, preventing administration of the associated service and its subscriptions. (A subscription is a description of a replication operation involving one source table and one destination table. A single Data Replicator Service can handle many subscriptions).
Performance
Supported Platforms:HDR is supported on the following platforms:
Migrating Transaction ProcessesMicrosoft Transaction Server (MTS) is a transaction management server that provides reliable, secure transaction management for Web applications. The following section provides information that can help you plan a migration of transaction-driven applications from any legacy environment to the Windows NT 4.0 environment where transactions requested by IIS are managed by MTS. Why Use Transactions?Two changes in the use of information technology make the increased deployment of transaction management systems compelling for many organizations:
A transaction is a multi-part update process in which the update is committed—made final—only if all of the parts of the transaction are completed successfully. An online transaction is an update process that is initiated and carried out over a data network. The explosive growth of the Internet and organizational intranets has presented new opportunities for doing business over data networks. The elemental expression of doing business, the exchange of money for goods or services, requires updates to more than one database for each exchange. Software design is increasingly shifting toward a component model in which applications are made up of many code segments operating independently of each other. Often, an application allows more than one component to concurrently update a database, or more than one database. Concurrent updates require a transaction manager to ensure transaction integrity while optimizing performance. For more information, see Chapter 6, "Data Access and Transactions." Migrating to MS Transaction Server (MTS)There is a growing need for transaction management on the Web, and there are many existing transaction systems on legacy networks processing business-critical data. Hence, many organizations need to manage transactions in both environments. One serious obstacle is that legacy transaction systems do not extend across boundaries, such as the boundary between SNA legacy networks and TCP/IP-based intranets with Windows NT–based servers. In other words, a legacy TP running under CICS or IMS cannot account for a database update on the Windows NT network. Additionally, the costs of development, hosting, and scaling up are higher in the legacy environment than on Windows NT–based networks. The best solution is a Windows NT–based transaction management system that coordinates IIS-based Web transactions and legacy TPs. Any transaction can then involve updates of databases running under Windows NT, running under a mainframe TP, or both at once. Transaction processes can be selectively migrated to Windows NT–based database management software such as SQL Server, and any transaction processes left on the mainframe can be managed from Windows NT as well. MTS Features and CapabilitiesMicrosoft Transaction Server (MTS) expands the capabilities of IIS to include Web-based transaction management. MTS is a component-based transaction management solution that provides a programming model, a run-time environment, and graphical server administration tools—everything required to design and develop a transaction application and migrate a legacy process to it. With MTS, Web developers using ASP can develop full transaction management capabilities for deployment on the Web. By deploying MTS as your transaction management system, you can profit from the advantages of the Windows NT environment and migrate selected legacy transactional processes. In the meantime, MTS extends transaction management to include processes left running in the legacy environment. In addition to full transaction monitoring and management, and the low cost of scaling up Windows NT–based systems and software, MTS offers advantages over its mainframe-based counterparts at design time and run-time, as well as for maintenance and administration. MTS Design TimeThe MTS programming model provides the framework for developing components that encapsulate business logic. MTS fits perfectly in a three-tier programming model (see the sidebar, "Three-Tier Applications and Middleware"). MTS acts as middleware, managing the components which make it possible for a Web application to handle many clients. It also provides developers with a great deal of flexibility:
Three-Tier Applications and MiddlewareA three-tier application divides a networked application into three logical areas. Middleware, such as MTS, connects the three tiers. Tier 1 handles presentation. In a Web application, data is requested by the browser and is sent there from the Web server for display. Tier 2 processes business logic, meaning the set of rules for processing business information. In an IIS-based Web application, Tier 2 processing is carried out in IIS components. Tier 3 processes the data—associated databases and files where the data is stored. In a Web application, Tier 3 consists of a back-end database management system or file access system with its associated data. Three-tier systems are easier to modify and to maintain than two-tier systems because the programming of presentation, business logic, and data processing are separated by design. This architecture permits re-development to proceed in one tier, without affecting the others. Middleware, such as MTS, manages the connections between the tiers, and makes efficient use of resources so that Web application programmers can concentrate on business logic. MTS can connect the browser request (Tier 1) to the business logic (Tier 2). In Tier 3, it can connect business logic to the databases and manage all activities of the transaction. Application programming interfaces and resource dispensers make applications scalable and robust. Resource dispensers are services that manage non-durable shared state on behalf of the application components within a process. This way, you don't have to undertake traditional programming tasks associated with state maintenance. MTS works with any application development tool capable of producing ActiveX dynamic-link libraries (DLLs). For example, you can use Microsoft Visual Basic, Microsoft Visual C++, Microsoft Visual J++, or any other ActiveX tool to develop MTS applications. MTS is designed to work with a wide variety of resource managers, including relational database systems, file systems, and document storage systems. Developers and independent software vendors can select from a wide range of resource managers and use two or more resource managers within a single application. The MTS programming model makes migration easier by making transaction application development simpler and faster than traditional programming models allow. For more information on developing MTS applications, see Chapter 6, "Data Access and Transactions." MTS Run TimeThe MTS run-time environment is a second-tier platform for running MTS components. This environment provides a comprehensive set of system services including:
This run-time infrastructure makes application development, deployment, and the management of applications much easier by making applications scalable and robust. Overall performance is optimized by managing component instantiation and the connection pool. MTS instantiates components just in time for transactions, then purges state information from the instance when a transaction completes, and reuses the instance for the next transaction. For example, users can enter transaction requests from their browsers to an ASP page containing the code needed to call an MTS component. As these messages are received by MTS, the transactions are managed using components already instantiated. This minimizes the proliferation of object instantiation and connection-making that often inhibit the performance of systems supporting transactions. MTS Administration ToolsMTS Explorer is a graphical administration tool used to register, deploy, and manage components executing in the MTS run-time environment. With MTS Explorer, you can script administration objects to automate component deployment. Planning a Migration to MTSAs you migrate processes and databases from a legacy environment (TPs running under CICS on a mainframe) to MTS, TPs will continue to run on the mainframe for a while. To migrate to MTS:
You can migrate parts of the legacy transaction infrastructure to SQL Server and use MTS to manage the parts of the transaction on the legacy host. All of the data can be accessed by IIS using ASP scripts. Mapping Transaction Tasks to Windows NT–based ApplicationsThe following table maps transaction-related functions to the applications used to support functions in the Windows NT environment. Table 9.1 Transaction-Related Functions and Windows NT-Based Applications
ResourcesThe following resources provide additional information on accessing legacy applications and data. Web Linkshttp://www.microsoft.com/sna/ This Web site provides information about Microsoft SNA Server, the COM Transaction Integrator for CICS and IMS, the OLE DB Provider for VSAM and AS/400, and the Host Data Replicator. Software Product DocumentationFor information about Microsoft SNA Server, COM Transaction Integrator for CICS and IMS, OLE DB Provider for VSAM and AS/400, and the Host Data Replicator, see the SDK documentation included with Microsoft SNA Server 4.0. |