< Previous | Next >

Lesson 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.
The IMS transaction that is used in this tutorial is not one of the IMS Installation Verification Programs. This tutorial 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. However, to run this tutorial you must configure your environment for DFSDDLT0 and provide the necessary JCL. 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  Z0017 DATA  SKS2 M2 SI1M3 SI1
WTO SEGMENT SI1 RECEIVED
L        GN
E      QD
WTO END OF INPUT SEGMENTS
L        ISRT  IW06OUT
L  Z0012 DATA  *******M1SO1
E      OK
WTO SEGMENT SO1 INSERTTED
L        ISRT
L  Z0027 DATA  ********M1SO2*********M2SO2
E      OK
WTO SEGMENT SO2 INSERTTED
L        ISRT
L  Z0048 DATA  **********M1SO3***********M2SO3************M3SO3
E      OK
WTO SEGMENT SO3 INSERTTED
WTO CURRENT PROGRAM STLDDLT2 TERMINATED
L        GU
This tutorial uses COBOL data structures to describe the IMS transaction input and output messages. Note that the output message returned by IMS consists of three fixed-length segments:
  • OUTPUT-SEG1 (16 bytes)
  • OUTPUT-SEG2 (31 bytes)
  • OUTPUT-SEG3 (52 bytes)

The output message returned by this particular IMS application is a fixed size of 99 bytes and is represented by the COBOL 01 structure OUTPUT-MSG.

One way of developing this multi-segment application is to use the COBOL definition OUTPUT-MSG to define the output of the transaction. A second way is to create an output message for the output of the transaction. The code provided with this tutorial uses the second method, since it can also be used to build an application that processes a variable length output message. The COBOL definitions for the individual message segments continue to be used to simplify access to the data of the individual segments

Connecting to the IMS server

  1. If the Java™ EE icon, Java EE perspective, does not appear in the top right tab of the workspace, you need to switch to the Java EE perspective. From the menu bar, select Window > Open Perspective > Other. The Select Perspective page opens.
  2. Select Java EE, and click OK. The Java EE perspective opens.
  3. In the Java EE perspective, select File > New > Other.
  4. In the New page, select J2C > J2C Bean. Click Next
  5. In the Resource Adapters Selection page, select IMS TM. For this tutorial select IMS TM Resource Adapter (IBM:10.2.0). Click Next.
  6. On The Connector Import page, select WebSphere® Application Server v. 7.0.
    Connector page
  7. On the Scenario Selection page, select IMS COBOL, PL/I, or C-based applications.
    Scenario Selection page
  8. In the Connection Properties page, clear Managed Connection and select Nonmanaged connection. (For this tutorial, you 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 data store.
      Important: You can obtain the connection information from your IMS system administrator.
  9. When you have provided the required connection information, click Next.
< Previous | Next >

Feedback