java.lang.Object java.lang.Throwable java.lang.Exception javax.resource.ResourceException com.ibm.connector2.ims.ico.IMSDFSMessageException
public class IMSDFSMessageException
implements Serializable
extends ResourceException
IMS Connector for Java 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(); } }
Constructor | Description |
---|---|
IMSDFSMessageException() | The default constructor. |
IMSDFSMessageException(String) | Creates an instance of IMSDFSMessageException, and provide a message for the instance. |
IMSDFSMessageException(String, byte[]) | Creates an instance of IMSDFSMessageException, and provide a message and a byte array containing a "DFS" message for the instance. |
Method | Description |
---|---|
String getDFSMessage() | Return the "DFS" message returned by IMS as a concatenated string of segments. |
Vector getDFSMessageSegments() | Returns the "DFS" message returned by IMS as a vector of segments. |
public IMSDFSMessageException()The default constructor.
public IMSDFSMessageException(String message)Creates an instance of IMSDFSMessageException, and provide a message for the instance.
- Parameters
- message - The detail message associated with the exception.
public IMSDFSMessageException(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.
public 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
public 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