LocalScopeDS class | QSYS API Reference Guide
Estimated reading time: 4 minutes
Base class that contains functionality to support locally scoped data structures.
Namespace: ASNA.QSys.Runtime Assembly: ASNA.QSys.Runtime.dll
Inheritance: Object
Remarks
Locally scoped data structures are defined as a class extending LocalScopeDS. The encapsulated DataStructure object provides the buffer functionality, while properties declared in the derived class access the encapsulated DataStructure.
Constructors
Name | Description |
---|---|
LocalScopeDS(Int32) | Constructs a LocalScopeDS object with a buffer of the given size. |
LocalScopeDS(DataStructure) | Constructs a LocalScopeDS object given a DataStructure to use. |
LocalScopeDS(Int32)
Constructs a LocalScopeDS object with a buffer of the given size.
LocalScopeDS(Int32)
Parameters
Type | Parameter name | Description |
---|---|---|
Int32 | size | Size of the Data Structure buffer. |
LocalScopeDS(DataStructure)
Constructs a LocalScopeDS object given a DataStructure to use.
LocalScopeDS(DataStructure)
Parameters
Type | Parameter name | Description |
---|---|---|
DataStructure | ds | The DataStructure object to use to hold the field values. |
Properties
Type | Name | Description |
---|---|---|
List<IDSField> | BufferDescription | Returns the flat description of the data structure buffer. |
DataStructure | DS | Gets or sets the DataStructure object to support the buffer where data is stored. |
String | DSName | Gets the name of this Data Structure object. |
List<IDSField> | Fields | Gets the Layout of this Data Structure. A null return means the DataStructure was defined via buffer length. |
Int32 | Length | Length of the Data Structure buffer. |
Methods
Signature | Description |
---|---|
Clear() | Clears the Data Structure. If the layout is defined, each field is cleared to its default value. Otherwise it is cleared to blanks. |
Dump() | Gets the contents of the Data Structure buffer as a string value. |
Load(String) | Sets the Data Structure buffer to the given string value, padding with blanks if necessary. |
ObjectToParm(As400Program, Int32[], Int32) | IDS.ObjectToParm implementation. Converts the Data Structure field values into parameters for calling the given IBMi program. |
op_Explicit(LocalScopeDS) | Casting operator to string. Returns the data structure as a string. |
ParmToObject(As400Program, Int32[], Int32) | IDS.ParmToObject implementation. Gets the Data Structure field values returned from a call to an IBMi program. |
ToString() | Gets the contents of the data structure as a string. |
void Clear()
Clears the Data Structure. If the layout is defined, each field is cleared to its default value. Otherwise it is cleared to blanks.
void Clear()
string Dump()
Gets the contents of the Data Structure buffer as a string value.
string Dump()
void Load(string source)
Sets the Data Structure buffer to the given string value, padding with blanks if necessary.
void Load(string source)
Parameters
Type | Parameter name | Description |
---|---|---|
String | source | The string to load into the buffer. |
void ObjectToParm(As400Program program, Int32[] indices, int dim)
IDS.ObjectToParm implementation. Converts the Data Structure field values into parameters for calling the given IBMi program.
void ObjectToParm(As400Program program, Int32[] indices, int dim)
Parameters
Type | Parameter name | Description |
---|---|---|
As400Program | program | As400Program object describing the program call. |
Int32[] | indices | Array that hold the indices for the current parameter. |
Int32 | dim | The dimension nesting of the parameter. |
string op_Explicit(LocalScopeDS dataStructure)
Casting operator to string. Returns the data structure as a string.
string op_Explicit(LocalScopeDS dataStructure)
Parameters
Type | Parameter name | Description |
---|---|---|
LocalScopeDS | dataStructure | Data structure to cast to string. |
Returns
Type | Description |
---|---|
String |
void ParmToObject(As400Program program, Int32[] indices, int dim)
IDS.ParmToObject implementation. Gets the Data Structure field values returned from a call to an IBMi program.
void ParmToObject(As400Program program, Int32[] indices, int dim)
Parameters
Type | Parameter name | Description |
---|---|---|
As400Program | program | As400Program object describing the program call. |
Int32[] | indices | Array that hold the indices for the current parameter. |
Int32 | dim | The dimension nesting of the parameter. |
string ToString()
Gets the contents of the data structure as a string.
string ToString()