Try OpenEdge Now
skip to main content
Java Open Clients
Using the Open Client Java OpenAPI to Directly Access the AppServer : Handling returned values : Getting OUTPUT parameter values
 

Getting OUTPUT parameter values

After running a procedure or user-defined function you can access the OUTPUT parameters using the following ParamArray method:
Syntax
public Object getOutputParameter(int paramNum)
paramNum
Specifies the 0-based position of the parameter.
The output value is always returned as an Object. You need to cast the Object and assign it to the output variable you have created. If the value returned can be the Unknown value (?) (null in Java), for intrinsic types, you must use the Object type that corresponds to the intrinsic type to handle the return of the actual value.
This example gets an output integer parameter that might be set to the Unknown value (?) by ABL.
Example: Getting an OUTPUT parameter using the Java OpenAPI
// Create the ParamArray and run procedure
...
// Fill output parameter
Integer iCustomerNumber;
iCustomerNumber = (Integer) parms.getOutputParameter(0);
if (iCustomerNumber == null) ...;
else ...;