FriendShip Insurance Tutorial icon

FriendShip Insurance Tutorial

Скачати 48.51 Kb.
НазваFriendShip Insurance Tutorial
Розмір48.51 Kb.

FriendShip Insurance Tutorial

The FriendShip Insurance Tutorial demonstrates the transactional features of Microsoft’s COM Transaction Integrator (COMTI) working in conjunction with the Microsoft Transaction Server (MTS) and the Microsoft SNA Server.


  • Demonstrates how true heterogeneous distributed transaction processing can be accomplished simply and easily.

  • Demonstrates use of actual resources (SQL Server, DB2, and VSAM) together in a single atomic transaction.

  • Demonstrates how easy it is for MTS-based applications to control the outcome (Commit or Abort) of a transaction.


While the Friendship Insurance application is by no means a “real” insurance claims processing system, it does use real database and file resources, and it does apply real transactions against these resources on NT and MVS. While it takes a bit more effort to set up these resources for use with this tutorial, the benefit is that the tutorial provides a framework that can be easily extended for actual development.

There are two “clients” provided with this tutorial: a Visual Basic client and a Web-based client that uses an Active Server Page. Both clients invoke a single method (ProcessClaim) on the controlling component (PrcClaim) within the FriendShip Insurance MTS package. This method in turn invokes methods on other provided components as follows:

  • CLAIMKEY. This COMTI method obtains a unique claim key (claim number) from a VSAM file on an MVS/CICS mainframe

  • ValidateClaim. This method uses pre-stored policy data in a SQL Server table to validate the claim.

  • InsertClaimSummary. This method inserts a SQL Server record summarizing the claim.

  • INSERTCLAIM. This method inserts the actual claim record in a DB2 table on the mainframe.

  • INSERTREJECTEDCLAIM. This method is used when a claim is proved to be invalid. It inserts a record in a DB2 table on the mainframe logging the rejected claim.

The operations of obtaining a new claim key (VSAM update), inserting a new claim summary record (SQL Server) and inserting a new claim record or rejected claim record (DB2) are done together, atomically, in a single transaction.

To visualize the application flow and the scope of the transaction, run the PowerPoint slide show found in your …\FriendShip Insurance\DocumentsPowerpoints directory. Be sure run this in “Slide Show” mode in order to see the animation.


Setting up the Tutorial

The tasks involved in setting up this tutorial are creating the databases (SQL Server, VSAM, and DB2), creating an ODBC connection for SQL Server, creating and populating the MTS package, and setting up the transactional properties on the components within the package.


Creating the SQL Server Claims Database

If you have not already installed SQL Server on your machine or another in the network, you will need to do that. Note however, that if you have already installed MTS and you install SQL Server after MTS, you will need to re-install MTS because SQL Server will replace the Distributed Transaction Coordinator (DTC) with an older version that will not work with COMTI. After installing SQL Server, when you attempt to register the new SQL Server, use the NT machine name for the SQL Server name.

  1. Within the FriendShip Insurance\sql directory on your hard disk, locate the file Diskinit.sql. If your SQL Server database is not installed in the directory C:\mssql, you will need to edit this file with Notepad or other suitable program. If your SQL Server is installed in the directory C:\mssql, you do not need to do any editing (go to step 3 of this section).

  1. Locate all occurrences of “C:\mssql” and replace them with the fully qualified path to the directory in which your SQL Server is installed.

  1. Please note that Diskinit.sql uses VDEVNO 114 and 116. If these device numbers are not available on your system you must change these numbers to device numbers which are valid.

  1. Execute the batch file BldCust.cmd. This will build the Claims database on your SQL Server, populating it with sample data.


Creating an ODBC Connection for SQL Server

  1. From within the NT Control Panel, choose ODBC.

  1. Go to the System DSN tab and select Add. Choose SQL Server as the “driver” for your data source. Click Finish.

  1. Data Source = “Claims”

  1. If your SQL Server resides on your machine, select for its name. Otherwise select its name from the drop-down list.

  1. Set “CLAIMS” as the Login (Default) Database.

  1. Take all other defaults.

You have now defined an ODBC connection for the SQL Server database used by FriendShip Insurance.


Preparing your Mainframe

If you intend to run this tutorial "live" on your mainframe, there are some configuration steps documented in this section that you must take. We have provided sample files that you may use to assist you, but you will need to make changes appropriate for your own environment. If you do not intend to run "live" you may skip all of the steps indented under this topic area.


Creating the DB2 Database

  1. Locate the DB2 directory under \FriendShip Insurance. There you will find a file called db2create.txt that contains the CREATE TABLE statements used to define the CLAIMS and REJECTED_CLAIMS tables to DB2. You may move this file to your mainframe and use it there to set up your DB2 tables.

  1. A CICS Resource Control Table must also be modified and compiled to allow the CICS transaction programs to connect to DB2. There is a sample DFHRCT called Dsncrctf.txt that you may modify for this purpose under the Friendship Insurance\DB2 directory.


Creating the VSAM File

The file Vsam.txt contains sample JCL statements to define the CLAIMKEY VSAM file. You will need to edit this file to replace all occurrences of account names, volume names, etc., with your own names. These are currently all prefixed with "MS".


CICS Definitions

  1. There are three CICS COBOL programs that must be defined in the Program Processing Table. These are CLAIMINS, CLAIMREJ, and CLAIMKEY. In the FriendShip Insurance\CICS directory you will find a file called Cedappgt that contains the CEDA entries to define the programs to CICS using the RDO facility of CICS.

  1. In addition to the COBOL programs, a VSAM file must be defined to CICS. In the FriendShip Insurance\CICS directory you will a file called Cedafile.doc. This contains the CEDA entries needed to define the CLAIMKEY VSAM file using the RDO facility. Again, be sure to edit this file in order to use your own account information.

  1. Finally, for CICS, A VTAM Connection and Session must be defined between CICS and the SNA Server. There are two sample files under the directory FriendShip Insurance\CICS that you may want to use as starting points for these definitions. They contain CEDA entries for the RDO Facility. The files are Cedaconn and Cedasess for Connection and Session configuration respectively. Define the Connection first (example SEU5), identifying the Independent Logical Unit as the “Netname”. The example file uses an Independent LU name of ‘LOS20500’. Define the Session next, associating it with the Connection of ‘SEU5’. You will want to identify the appropriate LU and Connection names for your own environment.


Compile COBOL programs

There are three CICS COBOL programs that must be compiled and made available to CICS. If you already have procedures for compiling COBOL programs, use those procedures. If you don’t have procedures for compiling COBOL programs, sample JCL, JCL.txt, is provided under directory FriendShip Insurance\ClaimsCOBOL. You must modify this JCL according to your compiler installation.


Setting up COMTI “Remote Environments”

You may choose to run this tutorial with or without a mainframe actually connected. If you choose to run without a mainframe, you will use a special “playback” Remote Environment (RE) that simulates the presence of the host, but will operate only with certain very specific claim inputs (described later). If you choose to run live, you will use an RE that allows your components to interact with the actual COBOL applications that you install on the mainframe. The FriendShip Insurance clients and the MTS components themselves are the same regardless of RE choice.


Setting up an RE for Live Host Connection

Use the SNA Server Manager to configure the link to your host environment. Use the APPC Wizard located under the Manager's Tools menu to set up the necessary parameters for your COMTI RE. Be sure to specify the RE type as "CICS Link." Name the new RE "FriendShip Live."


Setting up an RE for Playback operation

  1. Run the COMTI Administration snap-in from the Windows NT Start menu.

  1. Expand the “COM Transaction Integrator” node.

  1. Right-click on the Remote Environments node in the scope pane and select “Create New.” Make it of type “Diagnostic Playback.”

  1. Browse for the recording file that has been provided with this tutorial. It is in the FriendShip Insurance directory as FriendShip.rcd. Name the new RE “FriendShip Playback”.

  1. Finish.


Setting up some Registry Keys

Locate and execute the reg file “ClaimsSettings.reg” in the “Regsettings” directory. This will allow IIS to use COMTI components in a local (out-of-proc) MTS package, and will allow you to run the FriendShip Insurance Visual Basic code under VB Debug mode if you wish.


Creating an MTS Package and Populating it with Components

  1. Run the MTS Explorer snap-in.

  1. Expand the “Computers, “ and “My Computer” nodes.

  1. Right click on the “Packages Installed” folder and select “New.”

  1. Create an empty package.

  1. Give it the name “FriendShip Insurance” and click Next.

  1. Select "Interactive User” and click Finish.

  1. Expand your new package and double click on the “Components” folder.

  1. Resize your Microsoft Management Console (MMC) window so that you have room on the desktop to bring up the Windows Explorer next to it.

  1. Using the Windows Explorer, locate the “VB” directory within the FriendShip Insurance directory on your hard disk.

  1. Select the only two DLLs in that directory (ClaimSrv and PrcClaim) and drag and drop them into the MTS Explorer snap-in results pane. MTS will create three components from these DLLs (ClaimSrv contains two classes). You should now see three MTS component icons in the results pane.

  1. Again using the Windows Explorer, locate the “ClaimsCOBOL” directory within the FriendShip Insurance directory on your hard disk.

  1. Select the three type libraries in that directory (Claimins.tlb, Claimkey.tlb, and Claimrej.tlb).

  1. Drag and drop these into the MTS Explorer results pane. MTS will create three COMTI components from these type libraries. You should now see a total of six MTS component icons in the results pane as shown below.

You now have all of the components needed for this tutorial application. You must now set the transactional properties of these components. NOTE: if you intend to run with your FriendShip Playback RE you must leave all of the transactional properties set to “Does not support transactions.”

If you intend to run this application live, you must set the transactional properties of the components according to the needs of the real application. To set the transactional property of a component, right click on the component icon, choose “properties” and select the “Transaction” tab. Choose the appropriate setting as described below.

PrcClaim.ProcessClaim Requires a new transaction

ClaimSrv.ValidateClaim Does not support transactions

All others… Requires a transaction


Setting Up the FriendShip Web Site

In order to run the FriendShip Insurance web-based client, you will need to set up your IIS environment to include a web site for FriendShip Insurance. We have tested this tutorial with IIS 4.0 and these instructions are tailored for that environment.

  1. Bring up the Internet Service Manager as a snap-in within the Microsoft Management Console.

  1. Right click on the default web site node and select New Virtual Directory. Click Next.

  1. Enter "FriendShip" for the Virtual Directory alias.

  1. Browse for the directory …FriendShip Insurance\Website..

  1. Check Script.

  1. Click Finish.


Running the FriendShip Insurance Application

You may run the application from either the supplied Visual Basic client (PrjClaim.exe) or via your browser from the web site ( http://localhost/FriendShip ). The information that you need to supply to the application is the same in both cases, so they are not described separately below. However, in either case if you choose to run with the Playback RE you will need to constrain yourself to certain input combinations – ones for which we have provided pre-recorded responses. If you choose to run live you may provide a wide variety of inputs. The Live and Playback cases are described below.


Running Live

  1. Ensure that your MVS CICS region is up. You may wish to bring up a 3270 session with the mainframe to assure yourself that you have connectivity to the mainframe via SNA Server, although no such session is required by the tutorial application.

  1. Ensure that the COMTI Resync Service is running (via the NT Control Panel), and that MSDTC (the Distributed Transaction Coordinator) service is also up. MSDTC will be started by the COMTI Resync Service if it is not already configured for Automatic startup.

  1. Ensure that the FriendShip Insurance MTS components are configured for the proper transactional attributes as described previously.

  1. Ensure that your SQL Server is running and that the Claims database is available on it.

  1. Associate all of the COMTI components with your live RE (FriendShip Live) unless they are already associated with it. To do this, use the COMTI Administration Tool. One by one, right-click on them and select “Move.” Then choose “FriendShip Live” from the list of available REs.

  1. Start up your choice of FriendShip Insurance clients. The web-based client is shown below.

You can set up the inputs shown above quickly by using the Preset button. On the VB client, this button sets up all input fields. On the web-based client, this button sets up all fields except the Incident Type. You must select an Incident Type before submitting the claim.

There are several valid social security numbers set up for you in the SQL Server database. The one provided by the Preset button is for a male patient. If you select an incident type that is inappropriate for a male (e.g., a pregnancy test), the claim will be rejected, and a rejected claim record will be written in the appropriate DB2 table.

There is one “special” care provider that can be entered if you wish to create a rolled back (aborted) transaction. If you enter “Chicago Hope” as the provider, the application will go through all of its steps, but before terminating, it will do a SetAbort on the transaction context, causing all database actions to be rolled back in concert. Transactions will also be aborted if the program detects any legitimate failures in dealing with any of its resources.

Running In Playback Mode

In Playback Mode the application still runs as it does in the live case, with two notable exceptions. Using a Playback RE, COMTI mimics the presence of the mainframe applications, providing return values and output parameters for the application’s methods as determined by the combination of inputs included in the recording file provided. This means that, unless you provide your own recording, you are restricted to the use of some specific inputs. Also when running with a Playback RE, COMTI cannot provide true transactional semantics.

To run in Playback Mode you must associate all of the COMTI components of the application with the Diagnostic Playback RE that you initially created (FriendShip Playback). To do this, use the COMTI Administration Tool. Locate the COMTI components for this application in the RE with which they are currently associated. One by one, right-click on the components and select “Move.” Then choose “FriendShip Playback” from the list of available REs.

You must also change the transactional attributes of each component in the MTS explorer to “Does not support transactions.” This is because the COMTI playback feature does not support transactions (its primary purpose is to allow disconnected testing of client interfaces).

You may now run the application from either client. However, you are restricted to using the default input values provided by the Preset button, and you must use an Incident Type of “EKG with Interpretation.”


Creating Your Own FriendShip Insurance COMTI Components

You can use the FriendShip Insurance tutorial to learn how to create your own COMTI components. To build the INSERTCLAIM component, follow the instructions below. You may repeat the instructions for the other two COMTI components if you wish.

First, delete the old CLAIMSRV2.INSERTCLAIM.1 component from the FriendShip Insurance MTS package.

Launch the COMTI Component Builder and select File/New. To create a component with the ProgID expected by the FriendShip Insurance client applications, be sure to use exactly the Library and Interface names shown below, as well as version number 1.0.

Make the RE Type “CICS Link” and indicate that the component requires a transaction, as shown. Click OK.

Now select File/Import/Cobol Declarations. Follow the wizard's directions using the Cobol source code file “claimins.cob” located in the ClaimsCB directory. Select the RVAL variable as the method's return value, and select the "input" direction for all other variables. They will become input parameters to the method. When you come to the "Specify Naming" screen, be sure to use the names as shown below.

When you finish moving through the import wizard, and expand the claimins method in Component Builder's scope pane, you should see the full description of the method that it just created from the COBOL source. It should look like this.

The definition of your component is now complete. Use File/Save As to create the type library and save it. Name it “ClaimInsert.tlb”.

To use this new component in the application, drag and drop it from the Windows Explorer into the FriendShip Insurance MTS package. It will function just as the originally provided component did.

If you choose to build the other components, refer to the pictures on the following pages for correct naming and configuration information.

^ The CLAIMKEY Interface



Troubleshooting Tips

Here are a few tips relating to commonly encountered problems. Before attempting to troubleshoot your installation however, be sure that your first attempt is with the provided components. It is best to get these working, either “live” or with a Playback RE, before you attempt to create your own components. This will give you a baseline of confidence in your environment.



Error message indicating “Object Required”


  • Check to be sure that all of the FriendShip components are installed properly in an MTS package.


Error message indicating “The SNA Server where local LU xxxx is defined is not active”


  • Activate your SNA Server or contact your network administrator.


Error message indicating that the “LU6.2 transport failed to allocate conversation”


  • Ensure that the host LU that you are using is active.

  • Ensure that your CICS region is up.

  • Ensure that all FriendShip components are associated with the correct Remote Environment (RE).


Error message indicating “COM Transaction Integrator was unable to enlist on the DTC Transaction”


  • Ensure that your basic connectivity is in place (Local, Remote LUs configured and Connection Active).

  • Ensure that your target CICS region is up.

  • Ensure that your Local LU is set up for Sync Level 2 operation and that it is associated with the name of the machine on which COMTI is running. Using the SNA Server Manager, look at Properties of your Local LU and check under the Advanced tab for “SyncPoint Support.”

  • Ensure that the COM Transaction Integrator Resync TP Service is running. You can check this via the NT Control Panel under Services.

  • Do not attempt to use a Playback RE if the transactional properties of your components are set to anything other than “does not support.”

  • Reset your NT transaction log in order to present CICS with a fresh (cold started) partner. You can do this by first stopping the COMTI Resync Service and then using a program called DAC, available from a DOS prompt, to reset the log. Look for this option under the Advanced tab. Only take this step with the understanding that this will cause any in-doubt transactions that are present on your NT system to be forgotten (made unrecoverable).


Error message indicating that the Transaction has been rolled back


  • Ensure that SQL Server is running and that you have run all necessary table initialization script (see instructions in this area).

  • Ensure that your mainframe applications are present, running, and not ABENDing in response to FriendShip’s method invocations.

  • Ensure that you are not using “Chicago Hope” as the service provider.

  • Check the NT system event log for more information.


FriendShip Insurance Tutorial iconFriendShip Insurance Demo Structure

FriendShip Insurance Tutorial iconДокументи
1. /short-estelle-tutorial.pdf
FriendShip Insurance Tutorial iconКонкурс щодо вступу до нових освітніх програм. Навчання по програмі llm in Insurance Law та msc Law and Finance спеціалізації
Навчання по програмі llm in Insurance Law та msc Law and Finance (спеціалізації: Banking and Financial Services, Law and Financial...
FriendShip Insurance Tutorial icon1 assurance 2 insurance

FriendShip Insurance Tutorial iconСтрахування 1 insurance

FriendShip Insurance Tutorial iconСтрахование 1 insurance

FriendShip Insurance Tutorial icon1 assurance 2 insurance

FriendShip Insurance Tutorial iconЛелюхіна А. С., магістр Житомирський державний технологічний університет страхові послуги в туристичній галузі в україні
Страхування невідкладної допомоги (assіstance insurance) – специфічний вид страхування, об’єктом якого є негайне надання допомоги...
FriendShip Insurance Tutorial iconМіністерство освіти І науки, молоді та спорту України Національний університет державної податкової служби України Інтернет-журнал про страхування «Форіншурер» Страховий рейтинг «Insurance top» Опольський університет (м.
Національний університет державної податкової служби України визнано як базовий навчальний заклад з організації та проведення Міжнародної...
FriendShip Insurance Tutorial iconНавчання по магістерській програмі в Queen Mary School of Law
Навчання по програмі llm in Insurance Law та msc Law and Finance (спеціалізації: Banking and Financial Services, Law and Financial...
Додайте кнопку на своєму сайті:

База даних захищена авторським правом © 2000-2013
При копіюванні матеріалу обов'язкове зазначення активного посилання відкритою для індексації.
звернутися до адміністрації