Submitting commands to IMS

Although the IMS TM resource adapter is intended primarily for you to run transactions on a host IMS system through a Java™ EE application, you can also issue IMS commands that are supported by IMS OTMA from your Java applications.

The IMS TM resource adapter uses the host product, IMS Connect, to access IMS. IMS Connect uses the cross-system coupling facility (XCF) to access IMS through OTMA.

Only certain IMS commands can to be submitted through the IMS OTMA interface. Because the IMS TM resource adapter accesses IMS through OTMA, IMS commands supported by OTMA are the only commands that can be submitted to IMS by an application that uses the IMS TM resource adapter.

The output of an IMS command is a message that consists of one or more segments of data. The output of some IMS commands is a DFS message. For example, the output of most /START commands is usually the message DFS058I START COMMAND COMPLETED. Other IMS commands do not return DFS messages. For example, /DISPLAY commands return multiple segments of data representing lines of display information. To treat both types of output the same, you must set the imsRequestType property of the IMSInteractionSpec class to 2 (IMS_REQUEST_TYPE_IMS_COMMAND). This value indicates to the IMS TM resource adapter that the interaction is an IMS command, and to treat DFS messages as normal output and not as Java exceptions.

Commands that can be submitted to IMS by an application that uses the IMS TM resource adapter can be found in the IMS commands reference.