Call class | QSYS API Reference Guide
Estimated reading time: 5 minutes
Provides functionality to handle calling a program residing in an IBMi server.
Namespace: ASNA.QSys.Runtime Assembly: ASNA.QSys.Runtime.dll
Inheritance: Object
Methods
Signature | Description |
---|---|
AddDSParm(String, DataDirection, IDSCallParm) | Adds a datastructure parameter to the program call. |
AddDSParm(String, DataDirection, IDSCallParm[]) | Adds a datastructure array parameter to the program call. |
AddParm(String, FieldType, DataDirection, Object) | Adds a parameter to the program call with an initial value (use for input and input/output parameters). |
AddParm(String, FieldType, DataDirection, Object[]) | Adds a parameter array to the program call with an initial value (use for input and input/output parameters). |
AddParm(String, FieldType) | Adds a parameter to the program call with no initial value (use only for output parameters). |
AddParm(String, FieldType, Int32) | Adds a parameter or parameter array to the program call with no initial value (use only for output parameters). |
CallProgram(String, Database) | Calls an IBMi Program with the parameters added to the call object. |
GetParm(String) | Retrieves the value of an output or update parameter based on its name. |
void AddDSParm(string name, DataDirection direction, IDSCallParm dsCallParm)
Adds a datastructure parameter to the program call.
void AddDSParm(string name, DataDirection direction, IDSCallParm dsCallParm)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the parameter. |
DataDirection | direction | Specifies if the parameter is input, output, or input/output. |
IDSCallParm | dsCallParm | The IDSCallParm object representing the datastructure to add to the program call. |
void AddDSParm(string name, DataDirection direction, IDSCallParm[] dsCallParmArray)
Adds a datastructure array parameter to the program call.
void AddDSParm(string name, DataDirection direction, IDSCallParm[] dsCallParmArray)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the parameter. |
DataDirection | direction | Specifies if the parameter is input, output, or input/output. |
IDSCallParm[] | dsCallParmArray | The IDSCallParm[] object representing the datastructure array to add to the program call. |
void AddParm(string name, FieldType type, DataDirection direction, object value)
Adds a parameter to the program call with an initial value (use for input and input/output parameters).
void AddParm(string name, FieldType type, DataDirection direction, object value)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the parameter. |
FieldType | type | The FieldType object that describes the parameter’s type and size. |
DataDirection | direction | Specifies if the parameter is input, output, or update. |
Object | value | Initial value for the parameter to be sent to the program being called. |
void AddParm(string name, FieldType type, DataDirection direction, Object[] valueArray)
Adds a parameter array to the program call with an initial value (use for input and input/output parameters).
void AddParm(string name, FieldType type, DataDirection direction, Object[] valueArray)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the parameter. |
FieldType | type | The FieldType object that describes the parameter’s type and size. |
DataDirection | direction | Specifies if the parameter is input, output, or update. |
Object[] | valueArray | Initial value for the parameter array to be sent to the program being called. |
void AddParm(string name, FieldType type)
Adds a parameter to the program call with no initial value (use only for output parameters).
void AddParm(string name, FieldType type)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the parameter. |
FieldType | type | The FieldType object that describes the parameter’s type and size. |
void AddParm(string name, FieldType type, int arrayLength)
Adds a parameter or parameter array to the program call with no initial value (use only for output parameters).
void AddParm(string name, FieldType type, int arrayLength)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the parameter. |
FieldType | type | The FieldType object that describes the parameter’s type and size. |
Int32 | arrayLength | The parameter’s length if it is an array (pass in 0 if it is not an array). |
void CallProgram(string name, Database database)
Calls an IBMi Program with the parameters added to the call object.
void CallProgram(string name, Database database)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the IBMi program to call. |
Database | database | The database to connect with in order to call the program. |
object GetParm(string name)
Retrieves the value of an output or update parameter based on its name.
object GetParm(string name)
Parameters
Type | Parameter name | Description |
---|---|---|
String | name | The name of the parameter to retrieve. |
Returns
Type | Description |
---|---|
Object | The value of the parameter requested. |