This chapter explains how to configure access to IMS data by using Oracle Studio for IMS, VSAM, and Adabas Gateways. It contains the following sections:
To be able to access IMS data, you must have a working connection to Oracle Connect for IMS, VSAM, and Adabas Gateways, which is installed on the IBM z/OS computer where your IMS files are located. You establish this connection by using Oracle Studio for IMS, VSAM, and Adabas Gateways.
Whenever needed, you can also use Oracle Studio for IMS, VSAM, and Adabas Gateways to configure Oracle Connect for IMS, VSAM, and Adabas Gateways.
Note:
The following task assumes that you have permission to access the IBM z/OS platform and that the Oracle Connect for IMS, VSAM, and Adabas Gateways daemon is running on this computer. Check with the system administrator to ensure these requirements are fulfilled.Perform the following steps to set up access to a computer that runs Oracle Connect for IMS, VSAM, and Adabas Gateways.
From the Start menu, select Programs, point to Oracle, and select Studio. Oracle Studio for IMS, VSAM, and Adabas Gateways opens.
In the Design perspective's Configuration view, right-click the Machines folder and select Add Machines.
The Add machine screen opens, as shown in Figure 5-1.
Enter the following information in each field:
Host name/IP address: Enter the name of the computer on the network or click Browse, to browse all the systems running a daemon listener on the specified port currently accessible over the network.
Port: Enter the port number where the daemon is running. The default port is 2551.
Display name: Enter an alias used to identify the system when different from the host name (optional).
User name: Enter the system administrator's user name.
Note:
You indicate the system administrator when the system is installed or by using the NAV_UTIL utility ADD_ADMIN operation. For details, see Oracle Connect for IMS, VSAM, and Adabas Gateways Installation and Configuration Guide for IBM z/OS.Password: Enter the system administrator's password. This is the password for the user entered in the User name field. If no password is necessary to access this system, do not enter anything.
Connect via NAT with fixed IP address: Select this if the system uses the NAT (Network Address Translation) firewall protocol, with a fixed configuration, mapping each external IP to one internal IP, regardless of the port specified.
Click Finish.
The computer is displayed in the Configuration view, in the Machine folder. You can edit the system's login information, or configure bindings, daemons, and users for each system.
Oracle Connect for IMS, VSAM, and Adabas Gateways supports SQL data access to IMS/DB data in the following three IMS/DB environments:
IMS-DLI: Batch access. The dedicated Oracle Connect for IMS, VSAM, and Adabas Gateways server, running as an IMS batch process, issues DLI commands to retrieve IMS/DB data. This data source can be used when the accessed database is not currently opened under CICS or IMS/TM.
The IMS-DLI data source does not support transaction processing.
IMS-DBCTL: This data source is suited to users employing CICS as their primary application platform for accessing IMS/DB data. All Oracle Connect for IMS, VSAM, and Adabas Gateways servers communicate with an Oracle Connect for IMS, VSAM, and Adabas Gateways-supplied CICS program. This program accepts requests for scheduling PSBs and retrieving data through DBCTL services.
IMS-DBDC: This data source is suited to users employing IMS/TM as their primary application platform for accessing IMS/DB data. All Oracle Connect for IMS, VSAM, and Adabas Gateways servers communicate with an Oracle Connect for IMS, VSAM, and Adabas Gateways-supplied IMS/TM program. This program accepts requests from Oracle Connect for IMS, VSAM, and Adabas Gateways servers and performs the DLI requests on their behalf.
The IMS-DBDC data source does not support transaction processing.
IMS/DB data sources support IMS/DB hierarchical structures, provided there exists a unique sequence field for all the segments within the hierarchy.
IMS/DB data sources do not support secondary indexes.
This section describes how to set up an IMS data source using Oracle Studio for IMS, VSAM, and Adabas Gateways. Each IMS/DB data source has its own considerations. Therefore, perform the procedure relevant for the data source you use, as follows:
After you defined the data source, proceed to the following task:
Setting Up the IMS/DB Data Source Metadata
The process of defining an IMS/DB DLI data source consists of the following tasks:
Configure a special daemon workspace to use an NVIMSSRV started task. In this workspace, set the server type to IMS and the startup script to NVIMSSRV.XY
.
All other settings are the same settings as those of the Navigator workspace provided with the Oracle Connect for IMS, VSAM, and Adabas Gateways installation.
See Adding a Workspace for information on adding a new workspace.
Note:
The suffix for the startup script enables instances of the server process for the workspace. Any suffix can be used, and Oracle Connect for IMS, VSAM, and Adabas Gateways automatically extends the suffix for each instance. You can use different suffixes in different started tasks to distinguish between the running servers.
The remote system specification in the binding setting for the IMS-DLI data source on the client must include the workspace name as part of the <remoteMachine>
statement.
The IMS-DLI data source connection is set using the Design Perspective Configuration view in Oracle Studio for IMS, VSAM, and Adabas Gateways. Perform the following steps to define the IMS-DLI data source connection.
In Oracle Studio for IMS, VSAM, and Adabas Gateways, in the Configuration view of the Design perspective, open the binding of the system where the data is located.
Right-click Data Source and select New Data Source.
The New Data Source screen opens, as shown in Figure 5-2.
Specify a name for the data source in the Name field.
Select IMS-DLI from the Type list.
Click Next.
The Data Source Connect String screen opens.
Click Finish.
After defining the connection, you can set the data source properties.
The following properties can be configured for the IMS/DCB DLI data source on the Properties tab of the Configuration Properties screen:
disableExplicitSelect=true|false
: When set to true
, this parameter disables the explicitSelect ADD
attribute; every field is returned by a SELECT * FROM...
statement.
Perform the following steps to configure the IMS/DB DLI data source.
Right-click the data source and select Edit Data Source.
The Configuration Properties screen opens.
On the Properties tab, configure the data source parameters as required.
On the Advanced tab, configure how arrays will be handled by selecting the relevant check boxes in the Virtual View Policy section. The following options are available:
Generate sequential view: Select this option if you want to map a non-relational file to a single table.
Generate virtual views: Select this option if you want to have an individual table created for every array in the non-relational file.
Include row number column: Select this option if you want to include a column that specifies the row number in the virtual or sequential view.
Inherit all parent columns: Select this option if you want the virtual views to include all the columns of the parent record.
Save your settings.
The process of defining an IMS/DB DBCTL data source consists of the following tasks:
The IMS/DB DBCTL data source connection is set using the Design Perspective Configuration view in Oracle Studio for IMS, VSAM, and Adabas Gateways.
To define the data source connection
In Oracle Studio for IMS, VSAM, and Adabas Gateways, in the Configuration view of the Design perspective, open the binding of the system where the data is located.
Right-click Data Source and select New Data Source.
The New Data Source screen opens, as shown in Figure 5-3.
Specify a name for the data source in the Name field.
Select IMS-DBCTL from the Type list.
Click Next.
The Data Source Connect String screen opens.
Specify the IMS-DBCTL connect string as follows:
PSB Name
: Specify the name of the PSB file that contains details of all the IMS/DB databases that you want to access.
Target System
: Specify the VTAM APPLID
of the CICS target system. The default value is CICS. This parameter is used when updating VSAM data. You can determine this value by activating the CEMT transaction on the target CICS system. The legend APPLID=target_system
appears in the bottom right corner of the screen.
VTAM NetName
: The VTAM netname of the specific connection being used by EXCI (and MRO) to relay the program call to the CICS target system. For example, if you issue the following command to CEMT:
CEMT INQ CONN
You see on the display screen that the netname is BATCHCLI
(this is the default connection supplied by IBM upon the installation of CICS). The default value is ATYCLIEN
.
Click Finish.
After defining the connection, you can set the data source properties.
The following properties can be configured for the IMS/DB DBCTL data source in the Properties tab of the Configuration Properties screen:
cicsProgname=ATYDBCTL
: This parameter specifies the ATYDBCTL program that is supplied with Oracle Connect for IMS, VSAM, and Adabas Gateways to enable updating VSAM data.
cicsTraceQueue=string
: This parameter specifies the name of the queue for output that is defined under CICS when tracing the output of the ATYDBCTL program. When not defined, the default CICS queue is used.
disableExplicitSelect=true|false
: When set to true
, this parameter disables the explicitSelect ADD
attribute; every field is returned by a SELECT * FROM...
statement.
exciTransid=string
: This parameter specifies the CICS TRANSID. This value must be EXCI or a copy of this transaction.
pbsName=string
: The PSB Name in the connect string, this parameter contains details of all the IMS/DB databases that you want to access.
targetSystemApplid=string
: The Target System in the connect string, this parameter specifies the VTAM applied of the CICS target system. The default value is CICS. This parameter is used when updating VSAM data. You can determine this value by activating the CEMT transaction on the target CICS system. The legend APPLID=target_system
appears in the bottom right corner of the screen.
vtamNetname=string
: The VTAM NetName in the connect string, this parameter specifies the connection being used by EXCI (and MRO) to relay the program call to the CICS target system. The default value is ATYCLIEN
.
Perform the following steps to configure the IMS/DB DBCTL data source.
Right-click the data source and select Edit Data Source.
On the Properties tab, configure the data source parameters as required.
To support rollback, on the Advanced tab, from the Transaction type list, select 1PC or 2PC, depending on the data source usage.
If you do not use 2PC, see the Oracle Database Heterogeneous Connectivity User's Guide for configuration information.
On the Advanced tab, configure how arrays will be handled by selecting the relevant check boxes in the Virtual View Policy section. The following options are available:
Generate sequential view: Select this option if you want to map a non-relational file to a single table.
Generate virtual views: Select this option if you want to have an individual table created for every array in the non-relational file.
Include row number column: Select this option if you want to include a column that specifies the row number in the virtual or sequential view.
Inherit all parent columns: Select this option if you want the virtual views to include all the columns of the parent record.
Save your settings.
The IMS/DB DBCTL data source accesses IMS/DB data under CICS.
To access IMS/DB data under CICS, perform the following steps.
Copy the ATYDBCTL
member from NAVROOT.LOAD
to a CICS DFHRPL
library (such as CICS.USER.LOAD
) and then define the ATYDBCTL
program under CICS using any available group such as the ATY group:
CEDA DEF PROG(ATYDBCTL) G(ATY) LANG(C) DA(ANY) DE(ATY IMSDB CICS PROGRAM
)
NAVROOT
is the high-level qualifier where the Oracle Connect for IMS, VSAM, and Adabas Gateways is installed.
After assigning the ATYDBCTL program to a group, install it as follows:
CEDA IN G(ATY)
Under CICS, run the CDBC transaction and select the first option (Connection). Provide the startup table suffix and DBCTL ID override value.
The process of defining an IMS/DB DBDC data source consists of the following tasks:
The IMS/DB DBDC data source connection is set using the Design Perspective Configuration view in Oracle Studio for IMS, VSAM, and Adabas Gateways.
To define the data source connection
In Oracle Studio for IMS, VSAM, and Adabas Gateways, in the Configuration view of the Design perspective, open the binding of the system where the data is located.
Right-click Data Source and select New Data Source.
The New Data Source screen opens, as shown in Figure 5-4.
Specify a name for the data source in the Name field.
Select IMS-DBDC from the Type list.
Click Next.
The Data Source Connect String screen opens.
Specify the IMS-DBDC connect string as follows:
XCF Group
: Specify the Cross System Coupling Facility collection of XCF members to which the connection belongs. A group may consist of up to eight characters, and may span between multiple systems.
XCF server
: Specify the Cross System Coupling Facility group member.
TPipe prefix
: Specify the transaction pipe prefix used to associate between the transaction and the transaction pipe it is using. The default value is ATTU
.
User name
: Specify the security facility user identification (for example, the RACF user identification).
Group name
: Specify the security facility group identification (for example, the RACF group identification).
Click Finish.
After defining the connection, you can set the data source properties.
The following properties can be configured for the IMS/DCB DBDC data source in the Properties tab of the Configuration Properties screen:
disableExplicitSelect=true|false
: When set to true
, this parameter disables the explicitSelect ADD
attribute; every field is returned by a SELECT * FROM...
statement.
imsTransname=string
: This parameter specifies the name of the IMS transaction that points to the program that is used to access the PSB used to access the IMS/DB data. The default name of the transaction is ATYIMSTM
.
maxSessions=n
: This parameter specifies the maximum number of sessions allowed. The default value is 5
.
racfGroupId=string
: This parameter specifies the security facility group identification (for example, the RACF group identification).
racfUserId=string
: This parameter specifies the security resource user name.
tpipePrefix=string
: The TPipe prefix in the connect string, this parameter is used to associate between the transaction and the transaction pipe it is using. The default is ATTU.
xcfClient=string
: This parameter specifies the client name for the Cross System Coupling Facility to which the connection belongs.
xcfGroup=string
: The XCF group in the connect string, this parameter specifies the Cross System Coupling Facility collection of XCF members the connection belongs to. A group may consist of up to eight characters, and may span between multiple systems.
xcflmsMember=string
: This parameter specifies the Cross System Coupling Facility group member.
xcfServer=string
: The XCF server in the connect string, this parameter specifies the Cross System Coupling Facility group member.
userName=string
: The user name in the connect string, this parameter specifies the security facility user identification (for example, the RACF user identification).
Perform the following steps to configure the IMS/DB DBDC data source.
Right-click the data source and select Edit Data Source.
On the Properties tab, configure the data source parameters as required.
On the Advanced tab, from the Transaction type list, select 0PC.
On the Advanced tab, configure how arrays will be handled by selecting the relevant check boxes in the Virtual View Policy section. The following options are available:
Generate sequential view: Select this option if you want to map a non-relational file to a single table.
Generate virtual views: Select this option if you want to have an individual table created for every array in the non-relational file.
Include row number column: Select this option if you want to include a column that specifies the row number in the virtual or sequential view.
Inherit all parent columns: Select this option if you want the virtual views to include all the columns of the parent record.
Save your settings.
The IMS/DB DBCTL data source accesses IMS/DB data under IMS/TM.
To access IMS/DB data under IMS/TM
Copy the ATYDBDC
program from NAVROOT.LOAD
to an IMS/TM program library (such as IMS.PGMLIB
) with the name of the PSB used to access the IMS/DB data.
Define an IMS transaction to point to the program, using statements similar to the following:
APPLCTN PSB=ATYDBDC,SCHDTYP=PARALLELTRANSACT CODE=ATYIMSTM,PRTY=(7,10,2),INQUIRY=NO,MODE=SNGL,EDIT=ULC
The default transaction name is ATYIMSTM.
If you use a different transaction, the transaction name must be less than or equal to eight characters and you must specify this value in the imsTransname
data source property in the binding.
Set up OTMA, as described in the Oracle Connect for IMS, VSAM, and Adabas Gateways Installation and Configuration Guide for IBM z/OS.
The IMS/DB data sources requires Oracle metadata.
Setting up the metadata in Oracle Connect for IMS, VSAM, and Adabas Gateways to enable working with IMS/DB is the same for all the IMS/DB data sources.
The mapping of IMS/DB metadata to Oracle metadata format has the following rules:
Segments are defined as tables within <table>
elements.
Tables inherit the key fields of their ancestors.
Tables have indexes for their full hierarchical paths.
Additional information is defined in dbCommand
attributes specified within the <table>
and <field>
elements.
If COBOL copybooks describing the data source records are available, you can import the metadata by running the metadata import in the Oracle Studio for IMS, VSAM, and Adabas Gateways Design Perspective Metadata tab. If the metadata is provided in a number of COBOL copybooks, with different filter settings (such as whether the first 6 columns are ignored or not), import the metadata from copybooks with the same settings and later import the metadata from the other copybooks.
If COBOL copybooks that describe the IMS/DB records do not exist, you must manually define the metadata.
To import the metadata, you need to perform the following tasks:
This section describes the steps required to select the input files that will be used to generate the metadata. The IMS/DB data source requires three types of files, DBD files, COBOL copybooks, and PSB source files. See Select the Input Files for an explanation of these files.
Perform the following task to enter the input files.
In the Configuration view, right-click the data source and select Edit Metadata.
The Metadata tab is displayed with the data source displayed in the Metadata view.
Right-click the Imports node under the data source and select the New Import menu option.
Enter a name for the import. The name can contain letters, numbers and the underscore character.
Select IMS/DB Import Manager as the import type.
Click Finish. The Metadata Import Wizard is displayed.
Click Add in the Import Wizard to add DBD files. The Add Resource screen opens, providing the option of selecting files from the local system or copying the files from another system.
Figure 5-5 shows the Add Resource screen.
If the files are located on a UNIX or Windows computer, do the following:
Right-click My FTP Sites and select Add.
The Add FTP Site screen opens, as shown in the following figure.
Enter the server name where the COBOL copybooks are located and, if not using an anonymous connection, enter a valid username and password to access the computer. The username is then used as the high-level qualifier.
Click OK. After accessing the remote computer, you can change the high-level qualifier by right-clicking the system in the Add Resource screen and selecting Change Root Directory.
Select the files to import and click Finish to start the file transfer. When complete, the selected files are displayed in the Get Input Files screen.
To remove any of these files, select the required file and click Remove.
Repeat the procedure for COBOL copybooks.
The format of the COBOL copybooks must be the same. For example, you cannot import a COBOL copybook that uses the first six columns together with a COBOL copybook that ignores the first six columns. In this type of case, repeat the import process.
You can import the metadata from one COBOL copybook and later add to this metadata by repeating the import using different COBOL copybooks.
Click Add in the Import wizard to add a PSB source file, if necessary.
The selected files are displayed in the Get Input Files screen, as shown in Figure 5-6.
Click Next to go to the Apply Filters task.
This section describes the steps required to apply filters on the COBOL Copybook files used to generate the Metadata. It continues the Select the Input Files task.
Perform the following task to apply filters.
Click Next.
The Apply Filters screen opens in the editor, as shown in Figure 5-7.
Apply filters to the copybooks, as needed.
The following COBOL filters are available:
COMP_6 switch: The MicroFocus COMP-6 compiler directive. Specify either COMP-6'1' to treat COMP-6 as a COMP data type or COMP-6'2' to treat COMP-6 as a COMP-3 data type.
Compiler source: The compiler vendor.
Storage mode: The MicroFocus Integer Storage Mode. Specify either NOIBMCOMP for byte storage mode or IBMCOMP for word storage mode.
Ignore after column 72: Ignore columns 73 to 80 in the COBOL copybooks.
Ignore first 6 columns: Ignore the first six columns in the COBOL copybooks.
Prefix nested column: Prefix all nested columns with the previous level heading.
Replace hyphens (-) in record and field names with underscores (_): A hyphen, which is an invalid character in Oracle metadata, is replaced with an underscore.
Case sensitive: Specifies whether to consider case sensitivity or not.
Find: Searches for the specified value.
Replace with: Replaces the value specified for in the Find field with the value specified here.
The following DBD filters are available:
Ignore after column 72: Ignore columns 73 to 80 in the COBOL copybooks.
Ignore first 6 columns: Ignore the first six columns in the COBOL copybooks.
Ignore labels: Ignore labels in the DBD files.
The following PSB filters are available:
Ignore after column 72: Ignore columns 73 to 80 in the COBOL copybooks.
Ignore first 6 columns: Ignore the first six columns in the COBOL copybooks.
Click Next to go to the Select Tables task.
This section describes the steps required to select the tables from the COBOL Copybooks.
The following task continues the Apply Filters task.
From the Select Tables screen, select the tables that you want to access. To select all tables, click Select All. To clear all the selected tables, click Unselect All.
Figure 5-8 shows the Select Tables screen.
The import manager identifies the names of the segments in the DBD files that will be imported as tables.
Click Next to continue to the Match DBD to COBOL task.
The Import Manipulation screen open.
This step lets you match the DBD file to your COBOL copybook. It is a continuation of the Select Tables task. Figure 5-9 shows the DBD to COBOL task that is displayed in the Editor.
Match each table selected from the DBD file with the COBOL copybook that contains the relevant table structure. Select the files and tables from the lists for each DBD entry.
Click Next to continue to the Manipulate the Imported Records task.
The Import Manipulation screen opens.
If required, you can now manipulate the imported records. This is an optional task.
This section describes the operations available for manipulating the imported records (tables). It continues the Select Tables task.
The import manager identifies the names of the records in the DDM Declaration files that will be imported as tables. You can manipulate the general table data in the Import Manipulation Screen.
Repeat the following step for all table records marked with a validation error. You resolve the issues in the Import Manipulation Screen.
From the Import Manipulation screen (see Import Manipulation Screen figure), right-click the table record marked with a validation error, and select the relevant operation. See Table 5-1, "Field Manipulation Options", for the available operations.
Click Next to continue to the Select the Metadata Model task.
Figure 5-10 shows the Import Manipulation screen.
The upper area of the screen lists the DDM Declaration files and their validation status. The metadata source and location are also listed.
The Validation tab at the lower area of the screen displays information about what needs to be resolved in order to validate the tables and fields generated from the COBOL. The Log tab displays a log of what has been performed (such as renaming a table or specifying a data location).
The following operations are available in the Import Manipulation screen:
Resolving table names, where tables with the same name are generated from different files during the import.
Selecting the physical location for the data.
Selecting table attributes.
Manipulating the fields generated from the COBOL, as follows:
Merging sequential fields into one (for simple fields).
Resolving variants by either marking a selector field or specifying that only one case of the variant is relevant.
Adding, deleting, hiding, or renaming fields.
Changing a data type.
Setting the field size and scale.
Changing the order of the fields.
Setting a field as nullable.
Selecting a counter field for the dimension of an array field. You can select the array counter field from a list of potential fields.
Setting column-wise normalization for fields with dimensions (arrays). You can create new fields instead of the array field where the number of generated fields will be determined by the array dimension.
Creating arrays and setting the array dimension.
Table 5-1 describes the available operations when you right-click a table entry.
Table 5-1 Field Manipulation Options
Option | Description |
---|---|
Fields Manipulation |
Customizes the field definitions, using the Field Manipulation screen. You can also access this screen by double-clicking the required table record. |
Rename |
Renames a table. This option is used especially when more than one table with the same name is generated from the COBOL. |
Set data location |
Sets the physical location of the data file for the table. |
Set table attributes |
Sets the table attributes. |
XSL manipulation |
Specifies an XSL transformation or JDOM document that is used to transform the table definitions. |
Remove |
Removes the table record. |
You can manipulate the data in the table fields in the Field Manipulation Screen. Double-click a line in the Import Manipulation Screen to open the Field Manipulation screen.
The Field Manipulation screen lets you make changes to fields in a selected table. You get to the Field Manipulation screen through the Import Manipulation Screen. Figure 5-11 shows the Field Manipulation screen.
The values displayed in the table on the Field Manipulation screen are calculated by the import process.
You can use the Primary Key Column column to define the primary key of the table and of the virtual views created for the table's arrays. When you select the Primary Key Column check box of array members, these columns form the primary key of the virtual view, together with the selected primary key columns of the parent.
You can carry out all of the available tasks in this screen through the menu or toolbar. You can also right click anywhere in the screen and select any of the options available in the main menus from a shortcut menu.
See Field Manipulation Screen Commands describes the commands that are available in the Field Manipulation screen. If a toolbar button is available for a task, it is pictured in the table.
This screen allows you to generate virtual and sequential views for tables containing arrays. In addition, you can configure the properties of the generated views.
This screen continues the Manipulate the Imported Records procedure.
In the Metadata Model Selection screen, you can select default values that apply to all tables or set specific settings per table. This screen inherits its default settings from the settings that you defined for the virtual view policy when you configure the data source properties (see Configuring the IMS/DB DLI Data Source Properties, Configure the IMS/DB DBCTL Data Source Properties, or Configure the IMS/DB DBDC Data Source Properties).
Note:
Selecting the Default values for all tables check box discards any table-specific settings that you set.Perform the following steps to select the metadata model.
Select from the following:
Default values for all tables: Select this option if you want to apply the same values to all tables to be imported.
Generate sequential view: Select this option if you want to map a non-relational file to a single table.
Generate virtual views: Select this option if you want to have an individual table created for every array in the non-relational file.
Virtual views include row number: Select this option if you want to include a column that specifies the row number in the virtual or sequential view.
Virtual views inherit all parent columns: Select this option if you want the virtual views to include all the columns of the parent record.
Specific virtual array view settings per table: Select this option if you want to apply different values to the tables to be imported. Then select the relevant check boxes.
Note:
After importing a table, you can change these settings on the Modeling tab of the table editor.Click Next to continue to the Import the Metadata task.
Figure 5-12 shows the Metadata Model Selection screen.
Figure 5-12 Metadata Model Selection Screen
This section describes the steps required to import the metadata to the target computer. It continues the Select the Metadata Model step.
You can now import the metadata to the computer where the data source is located, or import it later (in case the target computer is not available).
Perform the following steps to transfer the metadata.
Select Yes to transfer the metadata to the target computer immediately or No to transfer the metadata later.
Click Finish.
Figure 5-13 shows the Import Metadata screen.