|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.as400.access.ProgramParameter com.ibm.as400.access.ErrorCodeParameter
public class ErrorCodeParameter extends ProgramParameter implements Serializable
Represents an IBM i "error code parameter".
An API error code parameter is a variable-length structure that is common to most of the system APIs. The error code parameter controls how errors are returned to the application. The error code parameter must be initialized before the application calls the API. Depending on how the error code structure is set, this parameter either returns information associated with an error condition, or causes the Toolbox to return the errors as AS400Message objects. For some APIs, the error code parameter is optional. If you do not code the optional error code parameter, the API returns both diagnostic and escape messages. If you do code the optional error code parameter, the API returns only escape messages or error codes, and never returns diagnostic messages.
ProgramCall
,
ServiceProgramCall
,
AS400Message
,
Serialized FormModifier and Type | Field and Description |
---|
Fields inherited from class com.ibm.as400.access.ProgramParameter |
---|
PASS_BY_REFERENCE, PASS_BY_VALUE |
Constructor and Description |
---|
ErrorCodeParameter()
Constructs a simple default ErrorCodeParameter object. |
ErrorCodeParameter(boolean returnSubstitutionData,
boolean useCCHAR)
Constructs an ErrorCodeParameter object. |
Modifier and Type | Method and Description |
---|---|
String |
getMessageID()
Returns the error message ID that was returned in the error code parameter. |
String |
getSubstitutionData()
Returns the error message substitution data that was returned in the error code parameter. |
Methods inherited from class com.ibm.as400.access.ProgramParameter |
---|
addPropertyChangeListener, addVetoableChangeListener, getInputData, getOutputData, getOutputDataLength, getParameterType, isNullParameter, removePropertyChangeListener, removeVetoableChangeListener, setInputData, setNullParameter, setOutputDataLength, setParameterType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorCodeParameter()
ProgramCall.getMessageList()
or ServiceProgramCall.getMessageList()
.
AS400Message
public ErrorCodeParameter(boolean returnSubstitutionData, boolean useCCHAR)
getMessageID()
and getSubstitutionData()
.
Usage note: This constructor creates error code parameters which cause the run() methods of ProgramCall and ServiceProgramCall to return true even if the called program failed. With this constructor, in order to detect program failure the application must examine the error information returned in the ErrorCodeParameter.
returnSubstitutionData
- Whether the error information returned from the system is to include error message substitution data.
The default is false; that is, error message substitution data is not returned.useCCHAR
- Whether convertible character (CCHAR) support is to be used.
The default is false; that is, CCHAR support is not used.ProgramCall.run()
,
ServiceProgramCall.run()
Method Detail |
---|
public String getMessageID()
public String getSubstitutionData()
MessageFile.getMessage(String,String)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |