Previous Topic: Record CICS Transaction Gateway (ECI)Next Topic: Record SAP RFC via JCo


Record IMS Connect Service Images

To record IMS Connect service images:

  1. Before starting the recorder, add the following properties in local.properties as necessary:

    This ensures that the binary responses that represent acknowledgment messages (they do not include any payload data) are bypassed from copybook processing.

  2. Select IMS Connect as the transport protocol on the Basics tab of the Virtual Service Image Recorder.
  3. Complete the fields on the Basics tab, then click Next.

    The next step in the recorder opens.

  4. Enter the port and host information:
    Listen/Record on port

    Defines the port on which the client communicates to DevTest.

    Target host

    Defines the name or IP address of the target host where the server runs.

    Target port

    Defines the target port number listened to by the server. Leave this field blank if you will select a Proxy passthrough style.

    Defaults: 80 (HTTP) and 443 (HTTPS)

    IMS Format File

    Defines one of the following:

    • The name of the file that supports IMS connect requests that use the 160-byte header that the IBM sample app uses
    • An 80-byte header.

    The field definitions for these supported 160-byte and 80-byte headers are provided in the ims.format file in the LISA_HOME directory.

    To use the IMS Connect support that is included in DevTest by default, leave this field blank.

    Character Set

    Defines how the data is encoded by the application to be virtualized.

    Values:

    • ASCII - CP1252
    • EBCDIC - CP037
  5. Click Next to display the recording window.
  6. Start your application that communicates with the IMS Connect server and perform the activity that you want to record.

    Ensure that the host and port for this application are the host and port for the recorder (typically localhost:8001).

  7. When you see transactions have been recorded on the Virtual Service Image Recorder window, click Next.

    The data protocols window opens.

    By default, the TransactionCode header field (if it exists) is set as the request operation. Also, TransactionCode, DestinationId, and ClientId are added as arguments, if these fields exist in the format file definition.

  8. Add data protocols, including the Copybook data protocol if needed, and click Next.

    The conversation starter window opens.

  9. Click Next.
  10. Select the options to display the VSM and VSI, then click Finish.

    The Service Image Editor displays the IMS Connect service image.

IMS Connect Customized Format Files

If the system under test uses request headers that differ from the ones DevTest supports by default, follow these steps before recording:

  1. Create a file <custom-format>.format in the Data folder of the DevTest project.
  2. Edit the file in a text editor and add the following text to it. Provide your field definitions under the RequestUserHeader area.

    #-------------------------------------------------------------------------------------
    # The IMS™ request message (IRM) header contains a 28-byte fixed-format
    # section that is common to all messages from all IMS Connect client applications
    # that communicate with IMS TM.
    #-------------------------------------------------------------------------------------
    RequestHeaderCommon {
        LLLL                        int;                    #total message length IRM + user data
        IRMFixedHeader {
            LL                      short;                  #IRM_LEN, total length of the header segment including user header portion
            ZZ                      byte;                   #IRM_ARCH
            Flag0                   byte;                   #IRM_F0
            UserExitId              string(8);              #IRM_ID
            NakReasonCode           byte(2);                #IRM_NAK_RSNCDE
            Reserved1               byte(2);                #IRM_RES1
            MessageType             byte;                   #IRM_MessageType
            WaitTime                byte;                   #IRM_TIMER
            SocketConnectionType    byte;                   #IRM_SOCT
            EncodingSchema          byte;                   #IRM_ES
            ClientId                byte(8);                #IRM_CLIENTID
        }
    }
    
    #-------------------------------------------------------------------------------------
    # Format of user portion of IRM some custom header
    #
    # Following the 4-byte length field and the 28-byte fixed portion of the
    # IMS™ request message (IRM) header in IMS Connect client input messages,
    # user-written client applications can include a user-defined section in the IRM.
    #
    #-------------------------------------------------------------------------------------
    RequestUserHeader {                   
        MyFlag1                       byte;
        MyFlag2                       byte;
        MyFlag3                       byte;
        MyFlag4                       byte;
        TransactionCode             string(8);
        DestinationId               string(8);
        LogicalTerminal             string(8);
        Miscellaneous               byte(20);
    }
    
    #-------------------------------------------------------------------------------------
    # Format of data segments of request message
    #-------------------------------------------------------------------------------------
    RequestPayloadSegment  {
            LL                      short;
            ZZ                      byte(2);
            Data                    byte(LL:inclusive);
    }
    
    #-------------------------------------------------------------------------------------
    # Format of header for response message. Some responses will have it, some won't
    #-------------------------------------------------------------------------------------
    ResponseMessageHeader {
            LLLL                    int;                   # followed by multiple ResponsePayloadSegment
    }
    
    #-------------------------------------------------------------------------------------
    # Format of data segments of request message
    #-------------------------------------------------------------------------------------
    ResponsePayloadSegment {
            LL                      short;
            ZZ                      byte(2);
            Data                    byte(LL:inclusive);
    }
    

When the file is created and saved in the Data folder, it appears in the IMS Format file field in the recorder. You can select the format file for applications that use nondefault request headers.