com.ibm.connector2.ims.ico

Class IMSDFSMessageException

  • java.lang.Object
    • javax.resource.ResourceException
      • com.ibm.connector2.ims.ico.IMSDFSMessageException
  • All Implemented Interfaces:
    java.io.Serializable


    public class IMSDFSMessageException
    extends javax.resource.ResourceException
    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

      Constructors 
      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

      Methods 
      Modifier and Type Method and Description
      java.lang.String getDFSMessage()
      Return the "DFS" message returned by IMS as a concatenated string of segments.
      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

        public IMSDFSMessageException()
        The default constructor.
      • IMSDFSMessageException

        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

        public 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.
        Parameters:
        message - The detail message associated with the exception.
        dfsBytes - An EBCDIC byte array containing the "DFS" message returned by IMS.
    • Method Detail

      • getDFSMessage

        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

        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
(c) Copyright International Business Machines Corporation 2000, 2015