< Previous | Next >

Lesson 1.1: Select a resource adapter

This lesson leads you through the detailed steps to select and configure the resource adapter to connect to the IMS server.

This tutorial uses COBOL data structures to describe the IMS transaction input and output messages. The input and the output messages are identical, and they contain an array of customer elements, followed by a single field containing a function code. The array can have a maximum of eight elements, but for this tutorial only three elements are input to the IMS application program and only four elements are returned by the IMS application program.

The IMS transaction that is used by this tutorial is not one of the IMS Installation Verification Programs. It uses DFSDDLT0, an IMS application program that issues calls to IMS based on control statement information. The DFSDDLT0 control statements for this tutorial are provided below. However, you must configure your environment for DFSDDLT0 and provide the necessary JCL if you wish to run the tutorial. This tutorial uses SKS2 as the transaction code for the DFSDDLT0 application.

DFSDDLT0 control statements

S11 1 1 1 1    TP     1                                                  
L        GU                                                              
E      OK                                                                
E  Z0088 DATA  SKS2 03CN001Cathy Tang          CN002Haley Fung         X 
                CN003Steve Kuo           123456                          
WTO IC4JINOU: Single segment received from JITOC                         
L        GN                                                              
E      QD                                                                
WTO IC4JINOU: End of input segments from JITOC                           
L        ISRT  JITOC53                                                   
L  Z0113 DATA  TRNCD04CN001Cathy T.            CN002Haley F.           X 
                CN003Steve K.            CN004Kevin F.            65432X 
               1                                                         
E      OK                                                                
WTO IC4JINOU: Single segment inserted - 3 elements !!!!!!!!!!!!!         
L        GU

Connecting to the IMS server

  1. If the J2EE icon, J2EE perspective, does not appear in the top right tab of the workspace, you need to switch to the J2EE perspective. From the menu bar, select Window > Open Perspective > Other. The Select Perspective window opens.
  2. Select J2EE.
  3. Click OK. The J2EE perspective opens.
  4. In the J2EE perspective, select File > New > Other.
  5. In the New page, select J2C > J2C Java Bean. Click Next
    Note: If you do not see the J2C option in the wizard list, you need to Enable J2C Capabilities.
    1. From the menu bar, click Window > Preferences.
    2. On the left side of the Preferences window, expand Workbench.
    3. Click Capabilities. The Capabilities pane is displayed. If you would like to receive a prompt when a feature is first used that requires an enabled capability, select Prompt when enabling capabilities.
    4. Expand Enterprise Java.
    5. Select Enterprise Java. The necessary J2C capability is now enabled. Alternatively, you can select the Enterprise Java capability folder to enable all of the capabilities that folder contains. To set the list of enabled capabilities back to its state at product install time, click Restore Defaults.
    6. To save your changes, click Apply, and then click OK. Enabling Enterprise Java capabilities will automatically enable any other capabilities that are required to develop and debug J2C applications.
  6. In the Resource Adapters Selection page, select either the J2C 1.0 or J2C 1.5 IMS resource adapter. For this tutorial select IMS Connector for Java (IBM: 9.1.0.2.3). Click Next.
  7. In the Connection Properties page, de-select Managed Connection and select Nonmanaged connection. (For this tutorial, you will use a non-managed connection to directly access IMS.) Accept the default Connection class name of com.ibm.connector2.ims.ico.IMSManagedConnectionFactory. In the blank fields, enter all the required connection information. Required fields, indicated by an asterisk (*), include the following:
    1. For TCP/IP connection:
      1. Host name: (Required) The IP address or host name of IMS Connect.
      2. Port Number: (Required) The number of the port used by the target IMS connect.
    2. For local option connection:
      1. IMS Connect name: (Required) The name of the target IMS connect.
    3. For both:
      1. Data Store Name: (Required) The name of the target IMS datastore.
  8. You may obtain the connection information from your IMS system administrator. When you have provided the required connection information, click Next.