- Oracle Modernization Solutions
- Jason Williamson Tom Laszewski
- 1021字
- 2021-08-20 17:21:06
Exposing the Legacy VSAM File Data Access
Oracle Connect is a component that resides on the mainframe platform. It consists of native adapters for communicating with the mainframe application and data stores. The design-time configuration of Oracle AS Adapter for Legacy and mainframes consists of two steps. The first step involves using Oracle Studio for configuring the Oracle Connect engine and the metadata is stored on a file system at the Oracle Connect end. The second step consists of exposing the metadata obtained in the first step through a WSIL servlet. Oracle JDeveloper Web service has a WSIL browser which in turn connects to the WSIL servlet. The WSIL servlet communicates with Oracle Connect and exposes the metadata as WSDL with JCA extensions. The WSIL servlet is deployed in the Oracle Application Server Java EE container, and so it needs to be up and running at design time.
Connecting to Oracle Connect on Mainframe and Setting Connection Properties
Before anything is done, you must connect to your mainframe and set the properties for your connection as follows:
- The Oracle Studio connects to Oracle Connect running on the mainframe. Oracle Connect for VSAM needs to be installed and configured on the OS/390 machine. The steps are detailed in the Adapter User Guide.
Go to theConfiguration Explorer view, and selectMachine folder. Right-click and selectNew. This will bring up the connection panel on the right-hand side. Specify the connection parameters as shown here:
- Expanding the connection object shows a Bindings folder for defining workspaces (domains) and a default workspace called NAV. Expanding the Bindings folder shows an Adapters and Events folder. The Adapters folder is used to define JCA outbound interactions (request-response services), while the Events folder is used to define JCA Inbound Interactions (event services).
Two important property settings are:
- The property disable2PC needs to be false in order for the two-phase commit to work.
- To work with global transactions, set the convertAllToDistributed transaction environment property to true.
More information on the Oracle VSAM Adapter setup in the Legacy Studio can be found here:http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b31002/vsam_install.htm#i1008132.
Note
Keeping It Real: Once the Oracle Connect mainframe component is installed, connecting to your mainframe system through the Oracle Studio for Legacy Adapters is simple. The difficult task is to install Oracle Connect on the mainframe system because of the processes and procedures, people's resistance — 'not wanting new things on the mainframe', or even a lack of additional mainframe cycles.
Oracle Connect Data Source
Since we have so much to cover in this chapter and we want to focus on aspects such as the adapter, two-phase commit, and calling the adapter from Java, we will not create a new data source. Instead, we will take a look at an existing data source to keep screenshots to the minimum.
- The Data sources folder contains the VSAM data source. We will be using a data source called DS_VSAM.
Note that this is a ADD-VSAM type of data source.
- Click on the Advanced tab as shown in the screenshot. Click on the drop-down box for the Transaction type field. Change the transaction type to 2PC. This enables two-phase commit for this data source. Your screen should appear as follows:
- Right-click on the DS_VSAM data source and select the Edit Metadata. Expand the DS_VSAM entry (click the + sign) under the Data sources folder in the Metadata tab. Next, expand the Tables folder. Lastly, double-click on the INVOICE_DATA table entry. Your screen should appear as follows:
A couple of things to note on this screen:
- Data file field — This is the physical location of the VSAM data file on the mainframe.
- Maximum record length — The maximum length of each record is 80.
- Columns tab — This tab displays the columns (or in VSAM terms, fields) that make up the ODEM.OCON10G.DEMO10G.VSAM.DEMODATA VSAM file.
Note
Keeping It Real: Creating the data source is the first step. Most of your legacy services at some point will need to interact with a data source at some point whether they are presentation, transaction, or program-based services. Therefore, exposing the data source as a Web service is a common approach.
Oracle Connect Adapter
The adapter is what you will be talking to from your Java application to insert the VSAM record into the mainframe system using CICS. We will be using an existing adapter called AD_VSAM. This adapter uses the DS_VSAM data source created in the previous section. The adapter has select, insert, delete, and update interactions associated with it. 'Interactions' are the fundamental methods that Java EE, Oracle BPEL, or other applications interface to the legacy artifacts on the mainframe. Oracle Studio has a test run capability that can be used to test the interactions.
- The Adapters folder is used to define and modify a VSAM adapter. Right-click on the AD_VASM adapter in the Adapters folder and select Edit Metadata. The Metadata tab appears as follows:
The important thing to note here is that an adapter can have more then one type of interaction. As you can see in the above screenshot, five different interactions are associated with this one adapter.
- Double-click on the invoice_data_insert entry under the Schema entry, and you will see the following:
- The Schema Record tab shows the fields that will be passed to the AD_VSAM adapter to be inserted into the INVOICE_DATA VSAM file using the adapter. The XML payload expects all fields to be character strings so that is why all the fields for INVOICE_DATA_INSERT are string. Double-click on the invoice_data_insert entry under the Interactions entry, and you will see the following:
- The Input record is the invoice_data_insert schema we just looked at. The output record is the invoice_data_insertResponse schema. The response schema is basically the status of the insert and appears as follows:
- ANSYS 14熱力學·電磁學·耦合場分析自學手冊
- Photoshop CS6 互聯網應用設計教程
- 中文版 Photoshop CC 從入門到精通
- RESTful PHP Web Services
- Building Websites with VB.NET and DotNetNuke 4
- 中文版CINEMA 4D R20 實用教程
- 用Studio One輕松制作你的短視頻音樂
- 中文版Maya 2016基礎培訓教程
- Mastering Redis
- Photoshop人像精修秘笈
- Java EE 5 Development with NetBeans 6
- Oracle E/Business Suite R12 Supply Chain Management
- 精通AutoCAD 2013機械設計
- Photoshop+PxCook+Cutterman網頁UI設計教程
- MATLAB完全自學教程