com.ibm.connector2.ims.ico

Class IMSDFSMessageException

  1. java.lang.Object
  2. extended byjavax.resource.ResourceException
  3. extended bycom.ibm.connector2.ims.ico.IMSDFSMessageException
All implemented interfaces:
java.io.Serializable

  1. public class IMSDFSMessageException
  2. extends javax.resource.ResourceException
  3. implements java.io.Serializable
IMS TM Resource Adapter throws an IMSDFSMessageException when IMS returns a "DFS" message and the value of the imsRequestType property in the IMSInteractionSpec instance of the interaction is 1. An imsRequestType value of 1 is typically used by applications that are not generated using WebSphere Studio MFS support. This type of Java application should catch exceptions of type IMSDFSMessageException, since there is always the possibility that IMS will return a "DFS" message instead of the transaction output.

Note: Java applications that submit commands to IMS should set the value of the imsRequestType property in the IMSInteractionSpec instance of the interaction to 2. Java applications that are generated using WebSphere Studio MFS support should set the value of the imsRequestType property in the IMSInteractionSpec instance of the interaction to 3. Setting the value to 3 will ensure that the IMSDFSMessageException is not thrown when IMS returns a "DFS" message. Instead, the "DFS" message wis returned to the application as output.

The following example shows you how to retrieve a "DFS" message from an IMSDFSMessageException instance:

        ...
                } catch (Exception e) {
                        if (e instanceof IMSDFSMessageException) {
                                System.out.println(
                                        "\nIMS returned message: "
                                                + ((IMSDFSMessageException) e).getDFSMessage());
                        } else {
                                e.printStackTrace();
                        }
                }
   
See Also:
IMSInteractionSpec.setImsRequestType(int)

Constructor Summary

Constructor and Description
IMSDFSMessageException()
The default constructor.
IMSDFSMessageException(java.lang.String message)
Creates an instance of IMSDFSMessageException, and provide a message for the instance.
IMSDFSMessageException(java.lang.String message,byte[] dfsBytes)
Creates an instance of IMSDFSMessageException, and provide a message and a byte array containing a "DFS" message for the instance.

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getDFSMessage()
Return the "DFS" message returned by IMS as a concatenated string of segments.
  1. java.util.Vector
getDFSMessageSegments()
Returns the "DFS" message returned by IMS as a vector of segments.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IMSDFSMessageException

  1. public IMSDFSMessageException()
The default constructor.

IMSDFSMessageException

  1. public IMSDFSMessageException(java.lang.String message)
Creates an instance of IMSDFSMessageException, and provide a message for the instance.
Parameters:
message - The detail message associated with the exception.

IMSDFSMessageException

  1. public IMSDFSMessageException(java.lang.String message,
  2. byte[] dfsBytes)
Creates an instance of IMSDFSMessageException, and provide a message and a byte array containing a "DFS" message for the instance.
Parameters:
message - The detail message associated with the exception.
dfsBytes - An EBCDIC byte array containing the "DFS" message returned by IMS.

Method Detail

getDFSMessage

  1. public java.lang.String getDFSMessage( )
Return the "DFS" message returned by IMS as a concatenated string of segments. The length (LL) and flag (ZZ) fields are removed from the string.
Returns:
java.lang.String

getDFSMessageSegments

  1. public java.util.Vector getDFSMessageSegments( )
Returns the "DFS" message returned by IMS as a vector of segments. Each element of the vector is the text portion of the segment with the length (LL) and flag (ZZ) fields removed.
Returns:
java.util.Vector