DataStructure class | QSYS API Reference Guide
Estimated reading time: 48 minutes
Contains the functionality to support the semantics of a RPG Data Structure with a memory layout.
Namespace: ASNA.QSys.Runtime
Assembly: ASNA.QSys.Runtime.dll
Inheritance: Object
Constructors
Name |
Description |
DataStructure(Int32) |
Constructs a Data Structure object with a buffer of the given size. |
DataStructure(ILayout[]) |
Constructs a Data Structure object given an array of layout-described fields. The Data Structure size is computed out of the sizes of the individual fields. |
DataStructure(Int32)
Constructs a Data Structure object with a buffer of the given size.
Parameters
Type |
Parameter name |
Description |
Int32 |
size |
Size of the Data Structure buffer. |
Constructs a Data Structure object given an array of layout-described fields. The Data Structure size is computed out of the sizes of the individual fields.
Parameters
Type |
Parameter name |
Description |
ILayout[] |
layouts |
An ILayout array of field descriptions, assumed to be consecutive in the Data Structure. |
Properties
Type |
Name |
Description |
List<IDSField> |
BufferDescription |
Returns the flat description of the data structure buffer. |
DSDataArea |
DataArea |
Gets a DSDataArea object for this Data Structure. |
String |
DSName |
Gets the name of this Data Structure object. |
List<IDSField> |
Fields |
Gets the description of the Fields in this Data Structure. |
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. |
GetBinary(Int32, Int32, Int32) |
Gets a decimal number stored as a Binary decimal number starting at the specified position in the Data Structure buffer. |
GetByte(Int32) |
Gets a byte value from the specified position in the Data Structure buffer. |
GetChar(Int32) |
Gets a character from the specified position in the Data Structure buffer. |
GetDate(Int32, DateTimeFormat, DateTimeSeparator) |
Gets a Date value stored with the specified format and date separator at the specified starting position in the Data Structure buffer. |
GetHex(Int32, Int32) |
Gets a byte array from the Data Structure buffer, at the given start position for the given length. |
GetIndicator(Int32) |
Gets a character from the specified position in the Data Structure buffer and returns either ‘0’, if the character is ‘0’, or ‘1’if the character is anything else. |
GetInteger(Int32) |
Gets an integer (Int32) value starting at the specified position in the Data Structure buffer. |
GetLong(Int32) |
Gets an long (Int64) value starting at the specified position in the Data Structure buffer. |
GetNullableBinary(Int32, Int32, Int32) |
Gets a decimal number stored as a Binary decimal number starting at the specified position in the Data Structure buffer. |
GetNullableByte(Int32) |
Gets a byte value from the specified position in the Data Structure buffer. |
GetNullableChar(Int32) |
Gets a character from the specified position in the Data Structure buffer. |
GetNullableDate(Int32, DateTimeFormat, DateTimeSeparator) |
Gets a Date value stored with the specified format and date separator at the specified starting position in the Data Structure buffer. |
GetNullableIndicator(Int32) |
Gets a character from the specified position in the Data Structure buffer and returns either ‘0’, if the character is ‘0’, or ‘1’if the character is anything else. |
GetNullableInteger(Int32) |
Gets an integer (Int32) value starting at the specified position in the Data Structure buffer. |
GetNullableLong(Int32) |
Gets an long (Int64) value starting at the specified position in the Data Structure buffer. |
GetNullablePacked(Int32, Int32, Int32) |
Gets a decimal number stored as a Packed decimal number starting at the specified position in the Data Structure buffer. |
GetNullableShort(Int32) |
Gets a short (Int16) value starting at the specified position in the Data Structure buffer. |
GetNullableString(Int32, Int32) |
Gets a segment of the Data Structure buffer as a string. |
GetNullableTime(Int32, DateTimeFormat, DateTimeSeparator) |
Gets a Time value stored with the specified format and time separator at the specified starting position in the Data Structure buffer. |
GetNullableTimestamp(Int32, DateTimeSeparator) |
Gets a Timestamp value stored with the specified timestamp separator at the specified starting position in the Data Structure buffer. |
GetNullableZoned(Int32, Int32, Int32) |
Gets a decimal number stored as a Zoned decimal number starting at the specified position in the Data Structure buffer. |
GetPacked(Int32, Int32, Int32) |
Gets a decimal number stored as a Packed decimal number starting at the specified position in the Data Structure buffer. |
GetShort(Int32) |
Gets a short (Int16) value starting at the specified position in the Data Structure buffer. |
GetString(Int32, Int32) |
Gets a segment of the Data Structure buffer as a string. |
GetTime(Int32, DateTimeFormat, DateTimeSeparator) |
Gets a Time value stored with the specified format and time separator at the specified starting position in the Data Structure buffer. |
GetTimestamp(Int32, DateTimeSeparator) |
Gets a Timestamp value stored with the specified timestamp separator at the specified starting position in the Data Structure buffer. |
GetValue<U>(Int32) |
Gets the value of the field at the requested starting position in the buffer. |
GetZoned(Int32, Int32, Int32) |
Gets a decimal number stored as a Zoned decimal number starting at the specified position in the Data Structure buffer. |
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(DataStructure) |
Casting operator to string. Returns the data structure as a string. |
op_Implicit(DataStructure) |
Casting operator to DSDataArea. |
ParmToObject(As400Program, Int32[], Int32) |
IDS.ParmToObject implementation. Gets the Data Structure field values returned from a call to an IBMi program. |
SetBinary(Decimal, Int32, Int32, Int32) |
Stores a decimal number as a Binary decimal number starting at the specified position in the Data Structure buffer. |
SetByte(Byte, Int32) |
Stores a byte value in the specified position in the Data Structure buffer. |
SetChar(Char, Int32) |
Stores a character value in the specified position in the Data Structure buffer. |
SetDate(DateTime, Int32, DateTimeFormat, DateTimeSeparator) |
Stores the Date part of a DateTime value with the specified format and date separator in the Data Structure buffer. |
SetHex(Byte[], Int32, Int32) |
Stores a byte array in the Data Structure buffer, at the given start position for the given length. |
SetIndicator(Char, Int32) |
Stores an indicator value specified as a character in the specified position in the Data Structure buffer. |
SetInteger(Int32, Int32) |
Stores an integer (Int32) value starting at the specified position in the Data Structure buffer. |
SetLong(Int64, Int32) |
Stores an long (Int64) value starting at the specified position in the Data Structure buffer. |
SetNullableBinary(Nullable<Decimal>, Int32, Int32, Int32) |
Stores a decimal number as a Binary decimal number starting at the specified position in the Data Structure buffer. |
SetNullableByte(Nullable<Byte>, Int32) |
Stores a byte value in the specified position in the Data Structure buffer. |
SetNullableChar(Nullable<Char>, Int32) |
Stores a character value in the specified position in the Data Structure buffer. |
SetNullableDate(Nullable<DateTime>, Int32, DateTimeFormat, DateTimeSeparator) |
Stores the Date part of a DateTime value with the specified format and date separator in the Data Structure buffer. |
SetNullableIndicator(Nullable<Char>, Int32) |
Stores an indicator value specified as a character in the specified position in the Data Structure buffer. |
SetNullableInteger(Nullable<Int32>, Int32) |
Stores an integer (Int32) value starting at the specified position in the Data Structure buffer. |
SetNullableLong(Nullable<Int64>, Int32) |
Stores an long (Int64) value starting at the specified position in the Data Structure buffer. |
SetNullablePacked(Nullable<Decimal>, Int32, Int32, Int32) |
Stores a decimal number as a Packed decimal number starting at the specified position in the Data Structure buffer. |
SetNullableShort(Nullable<Int16>, Int32) |
Stores a short (Int16) value starting at the specified position in the Data Structure buffer. |
SetNullableString(String, Int32, Int32, Char, Boolean) |
Copies a string into a segment the Data Structure buffer, left adjusted. Pads on the right if necessary. |
SetNullableStringR(String, Int32, Int32, Char, Boolean) |
Copies a string into a segment the Data Structure buffer, right adjusted. Pads on the left if necessary. |
SetNullableTime(Nullable<DateTime>, Int32, DateTimeFormat, DateTimeSeparator) |
Stores the Time part of a DateTime value with the specified format and time separator in the Data Structure buffer. |
SetNullableTimestamp(Nullable<DateTime>, Int32, DateTimeSeparator) |
Stores the DateTime value as a Timestamp with the specified timestamp separator in the Data Structure buffer. |
SetNullableZoned(Nullable<Decimal>, Int32, Int32, Int32) |
Stores a decimal number as a Zoned decimal number starting at the specified position in the Data Structure buffer. |
SetPacked(Decimal, Int32, Int32, Int32) |
Stores a decimal number as a Packed decimal number starting at the specified position in the Data Structure buffer. |
SetShort(Int16, Int32) |
Stores a short (Int16) value starting at the specified position in the Data Structure buffer. |
SetString(String, Int32, Int32, Char, Boolean) |
Copies a string into a segment the Data Structure buffer, left adjusted. Pads on the right if necessary. |
SetStringR(String, Int32, Int32, Char, Boolean) |
Copies a string into a segment the Data Structure buffer, right adjusted. Pads on the left if necessary. |
SetTime(DateTime, Int32, DateTimeFormat, DateTimeSeparator) |
Stores the Time part of a DateTime value with the specified format and time separator in the Data Structure buffer. |
SetTimestamp(DateTime, Int32, DateTimeSeparator) |
Stores the DateTime value as a Timestamp with the specified timestamp separator in the Data Structure buffer. |
SetValue<U>(U, Int32) |
Sets the value of the field at the requested starting position in the buffer. |
SetZoned(Decimal, Int32, Int32, Int32) |
Stores a decimal number as a Zoned decimal number starting at the specified position in the Data Structure buffer. |
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.
string Dump()
Gets the contents of the Data Structure buffer as a string value.
Gets a decimal number stored as a Binary decimal number starting at the specified position in the Data Structure buffer.
decimal GetBinary(int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Binary decimal number. |
Int32 |
decimals |
The number of decimal positions in the Binary decimal number. |
Returns
Type |
Description |
Decimal |
The decimal number value of the Binary decimal number. |
Gets a byte value from the specified position in the Data Structure buffer.
byte GetByte(int position)
Parameters
Type |
Parameter name |
Description |
Int32 |
position |
Position in the Data Structure buffer. |
Returns
Type |
Description |
Byte |
The character at the given position in the buffer. |
Gets a character from the specified position in the Data Structure buffer.
char GetChar(int position)
Parameters
Type |
Parameter name |
Description |
Int32 |
position |
Position in the Data Structure buffer. |
Returns
Type |
Description |
Char |
The character at the given position in the buffer. |
Gets a Date value stored with the specified format and date separator at the specified starting position in the Data Structure buffer.
DateTime GetDate(int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the date format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the date separator used. |
Returns
Type |
Description |
DateTime |
A DateTime value where the Date part is the value retrieved from the Data Structure Buffer. |
Gets a byte array from the Data Structure buffer, at the given start position for the given length.
Byte[] GetHex(int start, int length)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
length |
Length of the array. |
Returns
Type |
Description |
Byte[] |
A byte array with the buffer contents at the specified start position and for the given length. |
Gets a character from the specified position in the Data Structure buffer and returns either ‘0’, if the character is ‘0’, or ‘1’if the character is anything else.
char GetIndicator(int position)
Parameters
Type |
Parameter name |
Description |
Int32 |
position |
Position in the Data Structure buffer. |
Returns
Type |
Description |
Char |
‘0’ if the character at the given position in the buffer is ‘0’, or ‘1’ otherwise. |
Gets an integer (Int32) value starting at the specified position in the Data Structure buffer.
int GetInteger(int start)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Returns
Type |
Description |
Int32 |
The integer number starting at the given position in the buffer. |
Gets an long (Int64) value starting at the specified position in the Data Structure buffer.
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Returns
Type |
Description |
Int64 |
The long number starting at the given position in the buffer. |
Gets a decimal number stored as a Binary decimal number starting at the specified position in the Data Structure buffer.
Nullable<decimal> GetNullableBinary(int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Binary decimal number. |
Int32 |
decimals |
The number of decimal positions in the Binary decimal number. |
Returns
Type |
Description |
Nullable`1 |
The decimal number value of the Binary decimal number. |
Nullable<byte> GetNullableByte(int position)
Gets a byte value from the specified position in the Data Structure buffer.
Nullable<byte> GetNullableByte(int position)
Parameters
Type |
Parameter name |
Description |
Int32 |
position |
Position in the Data Structure buffer. |
Returns
Type |
Description |
Nullable`1 |
The character at the given position in the buffer. |
Nullable<char> GetNullableChar(int position)
Gets a character from the specified position in the Data Structure buffer.
Nullable<char> GetNullableChar(int position)
Parameters
Type |
Parameter name |
Description |
Int32 |
position |
Position in the Data Structure buffer. |
Returns
Type |
Description |
Nullable`1 |
The character at the given position in the buffer. |
Gets a Date value stored with the specified format and date separator at the specified starting position in the Data Structure buffer.
Nullable<DateTime> GetNullableDate(int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the date format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the date separator used. |
Returns
Type |
Description |
Nullable`1 |
A DateTime value where the Date part is the value retrieved from the Data Structure Buffer. |
Nullable<char> GetNullableIndicator(int position)
Gets a character from the specified position in the Data Structure buffer and returns either ‘0’, if the character is ‘0’, or ‘1’if the character is anything else.
Nullable<char> GetNullableIndicator(int position)
Parameters
Type |
Parameter name |
Description |
Int32 |
position |
Position in the Data Structure buffer. |
Returns
Type |
Description |
Nullable`1 |
‘0’ if the character at the given position in the buffer is ‘0’, or ‘1’ otherwise. |
Nullable<int> GetNullableInteger(int start)
Gets an integer (Int32) value starting at the specified position in the Data Structure buffer.
Nullable<int> GetNullableInteger(int start)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Returns
Type |
Description |
Nullable`1 |
The integer number starting at the given position in the buffer. |
Nullable<long> GetNullableLong(int start)
Gets an long (Int64) value starting at the specified position in the Data Structure buffer.
Nullable<long> GetNullableLong(int start)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Returns
Type |
Description |
Nullable`1 |
The long number starting at the given position in the buffer. |
Gets a decimal number stored as a Packed decimal number starting at the specified position in the Data Structure buffer.
Nullable<decimal> GetNullablePacked(int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Packed decimal number. |
Int32 |
decimals |
The number of decimal positions in the Packed decimal number. |
Returns
Type |
Description |
Nullable`1 |
The decimal number value of the Packed decimal number. |
Nullable<short> GetNullableShort(int start)
Gets a short (Int16) value starting at the specified position in the Data Structure buffer.
Nullable<short> GetNullableShort(int start)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Returns
Type |
Description |
Nullable`1 |
The short number starting at the given position in the buffer. |
Gets a segment of the Data Structure buffer as a string.
string GetNullableString(int start, int len)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
0-based starting position of the string in the Data Structure buffer. |
Int32 |
len |
Length of the string to retrieve. |
Returns
Type |
Description |
String |
The string of the given length that starts at the given position. |
Gets a Time value stored with the specified format and time separator at the specified starting position in the Data Structure buffer.
Nullable<DateTime> GetNullableTime(int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the time format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the time separator used. |
Returns
Type |
Description |
Nullable`1 |
A DateTime value where the Time part is the value retrieved from the Data Structure Buffer. |
Gets a Timestamp value stored with the specified timestamp separator at the specified starting position in the Data Structure buffer.
Nullable<DateTime> GetNullableTimestamp(int start, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the timestamp separator used. Only None or Default are allowed. |
Returns
Type |
Description |
Nullable`1 |
A DateTime value containing the Timestamp value retrieved from the Data Structure Buffer. |
Gets a decimal number stored as a Zoned decimal number starting at the specified position in the Data Structure buffer.
Nullable<decimal> GetNullableZoned(int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Zoned decimal number. |
Int32 |
decimals |
The number of decimal positions in the Zoned decimal number. |
Returns
Type |
Description |
Nullable`1 |
The decimal number value of the Zoned decimal number. |
Gets a decimal number stored as a Packed decimal number starting at the specified position in the Data Structure buffer.
decimal GetPacked(int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Packed decimal number. |
Int32 |
decimals |
The number of decimal positions in the Packed decimal number. |
Returns
Type |
Description |
Decimal |
The decimal number value of the Packed decimal number. |
Gets a short (Int16) value starting at the specified position in the Data Structure buffer.
short GetShort(int start)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Returns
Type |
Description |
Int16 |
The short number starting at the given position in the buffer. |
Gets a segment of the Data Structure buffer as a string.
string GetString(int start, int len)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
0-based starting position of the string in the Data Structure buffer. |
Int32 |
len |
Length of the string to retrieve. |
Returns
Type |
Description |
String |
The string of the given length that starts at the given position. |
Gets a Time value stored with the specified format and time separator at the specified starting position in the Data Structure buffer.
DateTime GetTime(int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the time format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the time separator used. |
Returns
Type |
Description |
DateTime |
A DateTime value where the Time part is the value retrieved from the Data Structure Buffer. |
Gets a Timestamp value stored with the specified timestamp separator at the specified starting position in the Data Structure buffer.
DateTime GetTimestamp(int start, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the timestamp separator used. Only None or Default are allowed. |
Returns
Type |
Description |
DateTime |
A DateTime value containing the Timestamp value retrieved from the Data Structure Buffer. |
Gets the value of the field at the requested starting position in the buffer.
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Position in the buffer where the field starts. |
Returns
Type |
Description |
U |
The value of the field that starts at the requested buffer position. |
Gets a decimal number stored as a Zoned decimal number starting at the specified position in the Data Structure buffer.
decimal GetZoned(int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Zoned decimal number. |
Int32 |
decimals |
The number of decimal positions in the Zoned decimal number. |
Returns
Type |
Description |
Decimal |
The decimal number value of the Zoned decimal number. |
Sets the Data Structure buffer to the given string value, padding with blanks if necessary.
Parameters
Type |
Parameter name |
Description |
String |
source |
The string to load into the buffer. |
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. |
Casting operator to string. Returns the data structure as a string.
string op_Explicit(DataStructure dataStructure)
Parameters
Type |
Parameter name |
Description |
DataStructure |
dataStructure |
Data structure to cast to string. |
Returns
Casting operator to DSDataArea.
DSDataArea op_Implicit(DataStructure ds)
Parameters
Type |
Parameter name |
Description |
DataStructure |
ds |
The DataStructure object to cast. |
Returns
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. |
Stores a decimal number as a Binary decimal number starting at the specified position in the Data Structure buffer.
void SetBinary(decimal value, int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Decimal |
value |
The decimal value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Binary decimal number. |
Int32 |
decimals |
The number of decimal positions in the Binary decimal number. |
Stores a byte value in the specified position in the Data Structure buffer.
void SetByte(byte value, int position)
Parameters
Type |
Parameter name |
Description |
Byte |
value |
The byte to store. |
Int32 |
position |
Position in the Data Structure buffer. |
Stores a character value in the specified position in the Data Structure buffer.
void SetChar(char val, int position)
Parameters
Type |
Parameter name |
Description |
Char |
val |
The character to store. |
Int32 |
position |
Position in the Data Structure buffer. |
Stores the Date part of a DateTime value with the specified format and date separator in the Data Structure buffer.
void SetDate(DateTime value, int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
DateTime |
value |
The DateTime value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the date format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the date separator used. |
Stores a byte array in the Data Structure buffer, at the given start position for the given length.
void SetHex(Byte[] value, int start, int length)
Parameters
Type |
Parameter name |
Description |
Byte[] |
value |
The byte array to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
length |
Length of the array. |
Stores an indicator value specified as a character in the specified position in the Data Structure buffer.
void SetIndicator(char val, int position)
Parameters
Type |
Parameter name |
Description |
Char |
val |
The indicator value as a character. |
Int32 |
position |
Position in the Data Structure buffer. |
Stores an integer (Int32) value starting at the specified position in the Data Structure buffer.
void SetInteger(int value, int start)
Parameters
Type |
Parameter name |
Description |
Int32 |
value |
The integer number to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Stores an long (Int64) value starting at the specified position in the Data Structure buffer.
void SetLong(long value, int start)
Parameters
Type |
Parameter name |
Description |
Int64 |
value |
The long number to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Stores a decimal number as a Binary decimal number starting at the specified position in the Data Structure buffer.
void SetNullableBinary(Nullable<decimal> value, int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Nullable<Decimal> |
value |
The decimal value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Binary decimal number. |
Int32 |
decimals |
The number of decimal positions in the Binary decimal number. |
Stores a byte value in the specified position in the Data Structure buffer.
void SetNullableByte(Nullable<byte> value, int position)
Parameters
Type |
Parameter name |
Description |
Nullable<Byte> |
value |
The byte to store. |
Int32 |
position |
Position in the Data Structure buffer. |
Stores a character value in the specified position in the Data Structure buffer.
void SetNullableChar(Nullable<char> val, int position)
Parameters
Type |
Parameter name |
Description |
Nullable<Char> |
val |
The character to store. |
Int32 |
position |
Position in the Data Structure buffer. |
Stores the Date part of a DateTime value with the specified format and date separator in the Data Structure buffer.
void SetNullableDate(Nullable<DateTime> value, int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Nullable<DateTime> |
value |
The DateTime value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the date format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the date separator used. |
Stores an indicator value specified as a character in the specified position in the Data Structure buffer.
void SetNullableIndicator(Nullable<char> val, int position)
Parameters
Type |
Parameter name |
Description |
Nullable<Char> |
val |
The indicator value as a character. |
Int32 |
position |
Position in the Data Structure buffer. |
Stores an integer (Int32) value starting at the specified position in the Data Structure buffer.
void SetNullableInteger(Nullable<int> value, int start)
Parameters
Type |
Parameter name |
Description |
Nullable<Int32> |
value |
The integer number to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Stores an long (Int64) value starting at the specified position in the Data Structure buffer.
void SetNullableLong(Nullable<long> value, int start)
Parameters
Type |
Parameter name |
Description |
Nullable<Int64> |
value |
The long number to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Stores a decimal number as a Packed decimal number starting at the specified position in the Data Structure buffer.
void SetNullablePacked(Nullable<decimal> value, int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Nullable<Decimal> |
value |
The decimal value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Packed decimal number. |
Int32 |
decimals |
The number of decimal positions in the Packed decimal number. |
Stores a short (Int16) value starting at the specified position in the Data Structure buffer.
void SetNullableShort(Nullable<short> value, int start)
Parameters
Type |
Parameter name |
Description |
Nullable<Int16> |
value |
The short number to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Copies a string into a segment the Data Structure buffer, left adjusted. Pads on the right if necessary.
void SetNullableString(string val, int start, int len, char padChar, bool pad)
Parameters
Type |
Parameter name |
Description |
String |
val |
String value to save. |
Int32 |
start |
Starting position of the string in the buffer. |
Int32 |
len |
Length of the string. |
Char |
padChar |
Character to pad the string if necessary. Default is blanks. |
Boolean |
pad |
Indicates whether to pad or not. Default is true. |
Copies a string into a segment the Data Structure buffer, right adjusted. Pads on the left if necessary.
void SetNullableStringR(string val, int start, int len, char padChar, bool pad)
Parameters
Type |
Parameter name |
Description |
String |
val |
String value to save. |
Int32 |
start |
Starting position of the string in the buffer. |
Int32 |
len |
Length of the string. |
Char |
padChar |
Character to pad the string if necessary. Default is blanks. |
Boolean |
pad |
Indicates whether to pad or not. Default is true. |
Stores the Time part of a DateTime value with the specified format and time separator in the Data Structure buffer.
void SetNullableTime(Nullable<DateTime> value, int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Nullable<DateTime> |
value |
The DateTime value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the time format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the time separator used. |
Stores the DateTime value as a Timestamp with the specified timestamp separator in the Data Structure buffer.
void SetNullableTimestamp(Nullable<DateTime> value, int start, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
Nullable<DateTime> |
value |
The DateTime value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the timestamp separator used. Only None or Default are allowed. |
Stores a decimal number as a Zoned decimal number starting at the specified position in the Data Structure buffer.
void SetNullableZoned(Nullable<decimal> value, int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Nullable<Decimal> |
value |
The decimal value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Zoned decimal number. |
Int32 |
decimals |
The number of decimal positions in the Zoned decimal number. |
Stores a decimal number as a Packed decimal number starting at the specified position in the Data Structure buffer.
void SetPacked(decimal value, int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Decimal |
value |
The decimal value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Packed decimal number. |
Int32 |
decimals |
The number of decimal positions in the Packed decimal number. |
Stores a short (Int16) value starting at the specified position in the Data Structure buffer.
void SetShort(short value, int start)
Parameters
Type |
Parameter name |
Description |
Int16 |
value |
The short number to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Copies a string into a segment the Data Structure buffer, left adjusted. Pads on the right if necessary.
void SetString(string val, int start, int len, char padChar, bool pad)
Parameters
Type |
Parameter name |
Description |
String |
val |
String value to save. |
Int32 |
start |
Starting position of the string in the buffer. |
Int32 |
len |
Length of the string. |
Char |
padChar |
Character to pad the string if necessary. Default is blanks. |
Boolean |
pad |
Indicates whether to pad or not. Default is true. |
Copies a string into a segment the Data Structure buffer, right adjusted. Pads on the left if necessary.
void SetStringR(string val, int start, int len, char padChar, bool pad)
Parameters
Type |
Parameter name |
Description |
String |
val |
String value to save. |
Int32 |
start |
Starting position of the string in the buffer. |
Int32 |
len |
Length of the string. |
Char |
padChar |
Character to pad the string if necessary. Default is blanks. |
Boolean |
pad |
Indicates whether to pad or not. Default is true. |
Stores the Time part of a DateTime value with the specified format and time separator in the Data Structure buffer.
void SetTime(DateTime value, int start, DateTimeFormat format, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
DateTime |
value |
The DateTime value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeFormat |
format |
The DateTimeFormat value that represents the time format to use. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the time separator used. |
Stores the DateTime value as a Timestamp with the specified timestamp separator in the Data Structure buffer.
void SetTimestamp(DateTime value, int start, DateTimeSeparator separator)
Parameters
Type |
Parameter name |
Description |
DateTime |
value |
The DateTime value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
DateTimeSeparator |
separator |
The DateTimeSeparator value that represents the timestamp separator used. Only None or Default are allowed. |
Sets the value of the field at the requested starting position in the buffer.
void SetValue<U>(U value, int start)
Parameters
Type |
Parameter name |
Description |
U |
value |
The value to set. |
Int32 |
start |
Position in the buffer where the field starts. |
Stores a decimal number as a Zoned decimal number starting at the specified position in the Data Structure buffer.
void SetZoned(decimal value, int start, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
Decimal |
value |
The decimal value to store. |
Int32 |
start |
Starting position in the Data Structure buffer. |
Int32 |
digits |
The total number of digits in the Zoned decimal number. |
Int32 |
decimals |
The number of decimal positions in the Zoned decimal number. |
string ToString()
Gets the contents of the data structure as a string.