ArrayMethods class | QSYS API Reference Guide

Estimated reading time: 44 minutes

Contains extension methods for handling Arrays according to RPG semantics.

Namespace: ASNA.QSys.Runtime Assembly: ASNA.QSys.Runtime.dll

Inheritance: Object

Methods

Signature Description
FillArrayWith(Array, Int32, Object) Fills a given array with the specified object.
GetIndices(Array, Int32) Obtains the indices of an array based on the linear index.
Initialize(Array, Object) Initializes the elements of an arbitrary array to the same value.
Lookup<T>(T[], T, SearchType, Indicator&) Searches an array for the specified element value.
Lookup<T>(T[], T, SearchType, Indicator&, Indicator&) Searches an array for the specified element value.
Lookup<T>(T[], T, SearchType, Int32, Indicator&) Searches an array for the specified element value.
Lookup<T>(T[], T, SearchType, Int32, Int32&, Indicator&) Searches an array for the specified element value.
Lookup<T>(T[], T, SearchType, Int32, Int32&, Indicator&, Indicator&) Searches an array for the specified element value.
Lookup<T>(T[], T, Int32, Int32) RPG’s %LOOKUP. Returns the index of the item in argArray that matches the search argument.
Lookup<T>(T[], T, Int32) RPG’s %LOOKUP. Returns the index of the item in argArray that matches the search argument.
Lookup<T>(T[], T) RPG’s %LOOKUP. Returns the index of the item in argArray that matches the search argument.
LookupGE<T>(T[], T, Int32, Int32) RPG’s %LOOKUPGE. Returns the index of the item in argArray that is greater than or equal to the search argument.
LookupGE<T>(T[], T, Int32) RPG’s %LOOKUPGE. Returns the index of the item in argArray that is greater than or equal to the search argument.
LookupGE<T>(T[], T) RPG’s %LOOKUPGE. Returns the index of the item in argArray that is greater than or equal to the search argument.
LookupGT<T>(T[], T, Int32, Int32) RPG’s %LOOKUPGT. Returns the index of the item in argArray that is greater than the search argument.
LookupGT<T>(T[], T, Int32) RPG’s %LOOKUPGT. Returns the index of the item in argArray that is greater than the search argument.
LookupGT<T>(T[], T) RPG’s %LOOKUPGT. Returns the index of the item in argArray that is greater than the search argument.
LookupLE<T>(T[], T, Int32, Int32) RPG’s %LOOKUPLE. Returns the index of the item in argArray that is less than or equal to the search argument.
LookupLE<T>(T[], T, Int32) RPG’s %LOOKUPLE. Returns the index of the item in argArray that is less than or equal to the search argument.
LookupLE<T>(T[], T) RPG’s %LOOKUPLE. Returns the index of the item in argArray that is less than or equal to the search argument.
LookupLT<T>(T[], T, Int32, Int32) RPG’s %LOOKUPLT. Returns the index of the item in argArray that is less than the search argument.
LookupLT<T>(T[], T, Int32) RPG’s %LOOKUPLT. Returns the index of the item in argArray that is less than the search argument.
LookupLT<T>(T[], T) RPG’s %LOOKUPLT. Returns the index of the item in argArray that is less than the search argument.
MoveToArray(Array, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination array, no padding.
MoveToArrayDiffFieldLength(Array, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination array of different field lengths, no padding.
MoveToArrayDiffFieldLengthWithPad(Array, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination array of different field lengths, with padding.
MoveToArrayWithPad(Array, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination array, with padding.
MoveToDateTimeArray(Array, Int32, Array, Int32, DateTimeDataKind, DateTimeFormat) RPG’s MOVEA. Moves source array to destination datetime array.
MoveToDateTimeArray(Array, Int32, Int32, Array, Int32, DateTimeDataKind, DateTimeFormat) RPG’s MOVEA. Moves source array to destination datetime array.
MoveToDateTimeArray(Array, Int32, DateTimeDataKind, DateTimeFormat, Array, Int32, DateTimeDataKind, DateTimeFormat) RPG’s MOVEA. Moves source datetime array to destination datetime array.
MoveToDateTimeArrayWithPad(Array, Int32, Array, Int32, DateTimeDataKind, DateTimeFormat) RPG’s MOVEA. Moves source array to destination datetime array, padding the result.
MoveToDateTimeArrayWithPad(Array, Int32, Int32, Array, Int32, DateTimeDataKind, DateTimeFormat) RPG’s MOVEA. Moves source array to destination datetime array, padding the result.
MoveToDateTimeArrayWithPad(Array, Int32, DateTimeDataKind, DateTimeFormat, Array, Int32, DateTimeDataKind, DateTimeFormat) RPG’s MOVEA. Moves source datetime array to destination datetime array, padding the result.
MoveToNumericArray(Array, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination numeric array.
MoveToNumericArray(Array, Int32, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination numeric array.
MoveToNumericArray(Array, Int32, Array, Int32, Int32, Int32) RPG’s MOVEA. Moves source array to destination fixed decimal array.
MoveToNumericArray(Array, Int32, Int32, Array, Int32, Int32, Int32) RPG’s MOVEA. Moves source fixed decimal array to destination fixed decimal array.
MoveToNumericArray(Array, Int32, DateTimeDataKind, DateTimeFormat, Array, Int32) RPG’s MOVEA. Moves source datetime array to destination numeric array.
MoveToNumericArray(Array, Int32, DateTimeDataKind, DateTimeFormat, Array, Int32, Int32, Int32) RPG’s MOVEA. Moves source datetime array to destination fixed decimal array.
MoveToNumericArrayWithPad(Array, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination numeric array, padding the result.
MoveToNumericArrayWithPad(Array, Int32, Int32, Array, Int32) RPG’s MOVEA. Moves source array to destination numeric array, padding the result.
MoveToNumericArrayWithPad(Array, Int32, Array, Int32, Int32, Int32) RPG’s MOVEA. Moves source array to destination fixed decimal array, padding the result.
MoveToNumericArrayWithPad(Array, Int32, Int32, Array, Int32, Int32, Int32) RPG’s MOVEA. Moves source fixed decimal array to destination fixed decimal array, padding the result.
MoveToNumericArrayWithPad(Array, Int32, DateTimeDataKind, DateTimeFormat, Array, Int32) RPG’s MOVEA. Moves source datetime array to destination numeric array, padding the result.
MoveToNumericArrayWithPad(Array, Int32, DateTimeDataKind, DateTimeFormat, Array, Int32, Int32, Int32) RPG’s MOVEA. Moves source datetime array to destination fixed decimal array, padding the result.
MoveToString(Array, Int32, String) RPG’s MOVEA. Moves source array to destination string.
MoveToStringWithPad(Array, Int32, String) RPG’s MOVEA. Moves source array to destination string, padding on the left with blanks.
SortArr(Array) RPG’s SORTARR. Sorts given array in ascending order.
SortArr(Array, Array) RPG’s SORTARR. Sorts a pair of arrays in ascending order, one containing the keys and the other the corresponding items.
SortArrReverse(Array) RPG’s SORTARR. Sorts given array in descending order.
SortArrReverse(Array, Array) RPG’s SORTARR. Sorts given array in descending order, one containing the keys and the other the corresponding items.

void FillArrayWith(Array target, int startPosition, object obj)

Fills a given array with the specified object.

void FillArrayWith(Array target, int startPosition, object obj)

Parameters

Type Parameter name Description
Array target Array to fill.
Int32 startPosition The array element where the copy starts.
Object obj Object to fill array with, must be a compatible type.

Int32[] GetIndices(Array myArr, int i)

Obtains the indices of an array based on the linear index.

Int32[] GetIndices(Array myArr, int i)

Parameters

Type Parameter name Description
Array myArr The array.
Int32 i The linear index.

Returns

Type Description
Int32[] The coordinate obtained from the linear position.

void Initialize(Array myArr, object val)

Initializes the elements of an arbitrary array to the same value.

void Initialize(Array myArr, object val)

Parameters

Type Parameter name Description
Array myArr The array to initialize.
Object val The value to place in the array elements.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, Indicator& ind)

Searches an array for the specified element value.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, Indicator& ind)

Parameters

Type Parameter name Description
T[] array The array to search.
T searchArgument The element value being searched for in the array.
SearchType searchType The type of search being performed. Only Hi, Lo, or Eq are valid.
Indicator& ind Indicator which will be set *ON (‘1’) if the specified SearchType type is satisfied by the search.

Returns

Type Description
Boolean Returns true if lookup is successful, false otherwise.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, Indicator& hiLoInd, Indicator& eqInd)

Searches an array for the specified element value.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, Indicator& hiLoInd, Indicator& eqInd)

Parameters

Type Parameter name Description
T[] array The array to search.
T searchArgument The element value being searched for in the array.
SearchType searchType The type of search being performed.
Indicator& hiLoInd Indicator which will be set *ON (‘1’) if the specified SearchType type is satisfied by the search.
Indicator& eqInd Indicator which will be set *ON (‘1’) if Lookup finds an exact match within the array.

Returns

Type Description
Boolean Returns true if lookup is successful, false otherwise.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, int startPosition, Indicator& ind)

Searches an array for the specified element value.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, int startPosition, Indicator& ind)

Parameters

Type Parameter name Description
T[] array The array to search.
T searchArgument The element value being searched for in the array.
SearchType searchType The type of search being performed. Only Hi, Lo, or Eq are valid.
Int32 startPosition The array index where the search will begin.
Indicator& ind Indicator which will be set *ON (‘1’) if the specified SearchType type is satisfied by the search.

Returns

Type Description
Boolean Returns true if lookup is successful, false otherwise.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, int startPosition, Int32& foundIndex, Indicator& ind)

Searches an array for the specified element value.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, int startPosition, Int32& foundIndex, Indicator& ind)

Parameters

Type Parameter name Description
T[] array The array to search.
T searchArgument The element value being searched for in the array.
SearchType searchType The type of search being performed. Only Hi, Lo, or Eq are valid.
Int32 startPosition The array index where the search will begin.
Int32& foundIndex The index of the array element that matches the search, or 0 if not found.
Indicator& ind Indicator which will be set *ON (‘1’) if the specified SearchType type is satisfied by the search.

Returns

Type Description
Boolean Returns true if lookup is successful, false otherwise.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, int startPosition, Int32& foundIndex, Indicator& hiLoInd, Indicator& eqInd)

Searches an array for the specified element value.

bool Lookup<T>(T[] array, T searchArgument, SearchType searchType, int startPosition, Int32& foundIndex, Indicator& hiLoInd, Indicator& eqInd)

Parameters

Type Parameter name Description
T[] array The array to search.
T searchArgument The element value being searched for in the array.
SearchType searchType The type of search being performed.
Int32 startPosition The array index where the search will begin.
Int32& foundIndex The index of the array element that matches the search, or 0 if not found.
Indicator& hiLoInd Indicator which will be set *ON (‘1’) if the specified SearchType type is satisfied by the search.
Indicator& eqInd Indicator which will be set *ON (‘1’) if Lookup finds an exact match within the array.

Returns

Type Description
Boolean True if lookup is successful, false otherwise.

int Lookup<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

RPG’s %LOOKUP. Returns the index of the item in argArray that matches the search argument.

int Lookup<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.
Int32 searchLength The number of elements to search after the startPos.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int Lookup<T>(T[] argArray, T searchArgument, int startPos)

RPG’s %LOOKUP. Returns the index of the item in argArray that matches the search argument.

int Lookup<T>(T[] argArray, T searchArgument, int startPos)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int Lookup<T>(T[] argArray, T searchArgument)

RPG’s %LOOKUP. Returns the index of the item in argArray that matches the search argument.

int Lookup<T>(T[] argArray, T searchArgument)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupGE<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

RPG’s %LOOKUPGE. Returns the index of the item in argArray that is greater than or equal to the search argument.

int LookupGE<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.
Int32 searchLength The number of elements to search after the startPos.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupGE<T>(T[] argArray, T searchArgument, int startPos)

RPG’s %LOOKUPGE. Returns the index of the item in argArray that is greater than or equal to the search argument.

int LookupGE<T>(T[] argArray, T searchArgument, int startPos)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupGE<T>(T[] argArray, T searchArgument)

RPG’s %LOOKUPGE. Returns the index of the item in argArray that is greater than or equal to the search argument.

int LookupGE<T>(T[] argArray, T searchArgument)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupGT<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

RPG’s %LOOKUPGT. Returns the index of the item in argArray that is greater than the search argument.

int LookupGT<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.
Int32 searchLength The number of elements to search after the startPos.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupGT<T>(T[] argArray, T searchArgument, int startPos)

RPG’s %LOOKUPGT. Returns the index of the item in argArray that is greater than the search argument.

int LookupGT<T>(T[] argArray, T searchArgument, int startPos)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupGT<T>(T[] argArray, T searchArgument)

RPG’s %LOOKUPGT. Returns the index of the item in argArray that is greater than the search argument.

int LookupGT<T>(T[] argArray, T searchArgument)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupLE<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

RPG’s %LOOKUPLE. Returns the index of the item in argArray that is less than or equal to the search argument.

int LookupLE<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.
Int32 searchLength The number of elements to search after the startPos.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupLE<T>(T[] argArray, T searchArgument, int startPos)

RPG’s %LOOKUPLE. Returns the index of the item in argArray that is less than or equal to the search argument.

int LookupLE<T>(T[] argArray, T searchArgument, int startPos)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupLE<T>(T[] argArray, T searchArgument)

RPG’s %LOOKUPLE. Returns the index of the item in argArray that is less than or equal to the search argument.

int LookupLE<T>(T[] argArray, T searchArgument)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupLT<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

RPG’s %LOOKUPLT. Returns the index of the item in argArray that is less than the search argument.

int LookupLT<T>(T[] argArray, T searchArgument, int startPos, int searchLength)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.
Int32 searchLength The number of elements to search after the startPos.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupLT<T>(T[] argArray, T searchArgument, int startPos)

RPG’s %LOOKUPLT. Returns the index of the item in argArray that is less than the search argument.

int LookupLT<T>(T[] argArray, T searchArgument, int startPos)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.
Int32 startPos The starting index in argArray.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

int LookupLT<T>(T[] argArray, T searchArgument)

RPG’s %LOOKUPLT. Returns the index of the item in argArray that is less than the search argument.

int LookupLT<T>(T[] argArray, T searchArgument)

Parameters

Type Parameter name Description
T[] argArray The array to be searched.
T searchArgument The search argument used to search the array.

Returns

Type Description
Int32 Returns the zero based starting index of a found value, otherwise a -1.

void MoveToArray(Array source, int srcStartPos, Array destination, int dstStartPos)

RPG’s MOVEA. Moves source array to destination array, no padding.

void MoveToArray(Array source, int srcStartPos, Array destination, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source Array.
Int32 srcStartPos Starting index of the source array.
Array destination Destination Array.
Int32 dstStartPos Starting index of the destination array.

void MoveToArrayDiffFieldLength(Array source, int srcStartPos, Array destination, int dstStartPos)

RPG’s MOVEA. Moves source array to destination array of different field lengths, no padding.

void MoveToArrayDiffFieldLength(Array source, int srcStartPos, Array destination, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source Array.
Int32 srcStartPos Starting index of the source array.
Array destination Destination Array.
Int32 dstStartPos Starting index of the destination array.

void MoveToArrayDiffFieldLengthWithPad(Array source, int srcStartPos, Array destination, int dstStartPos)

RPG’s MOVEA. Moves source array to destination array of different field lengths, with padding.

void MoveToArrayDiffFieldLengthWithPad(Array source, int srcStartPos, Array destination, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source Array.
Int32 srcStartPos Starting index of the source array.
Array destination Destination Array.
Int32 dstStartPos Starting index of the destination array.

void MoveToArrayWithPad(Array source, int srcStartPos, Array destination, int dstStartPos)

RPG’s MOVEA. Moves source array to destination array, with padding.

void MoveToArrayWithPad(Array source, int srcStartPos, Array destination, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source Array.
Int32 srcStartPos Starting index of the source array.
Array destination Destination Array.
Int32 dstStartPos Starting index of the destination array.

void MoveToDateTimeArray(Array source, int srcStartPos, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

RPG’s MOVEA. Moves source array to destination datetime array.

void MoveToDateTimeArray(Array source, int srcStartPos, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

Parameters

Type Parameter name Description
Array source Source array.
Int32 target Destination datetime array.
Array targetKind Datetime kind.
Int32 targetFormat Datetime format.
DateTimeDataKind srcStartPos Starting index of the source array.
DateTimeFormat dstStartPos Starting index of the destination array.

void MoveToDateTimeArray(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

RPG’s MOVEA. Moves source array to destination datetime array.

void MoveToDateTimeArray(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

Parameters

Type Parameter name Description
Array source Source fixed decimal array.
Int32 sourceDec Number of decimals in source.
Int32 target Destination datetime array.
Array targetKind Datetime kind.
Int32 targetFormat Datetime format.
DateTimeDataKind srcStartPos Starting index of the source array.
DateTimeFormat dstStartPos Starting index of the destination array.

void MoveToDateTimeArray(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

RPG’s MOVEA. Moves source datetime array to destination datetime array.

void MoveToDateTimeArray(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

Parameters

Type Parameter name Description
Array source Source datetime array.
Int32 sourceKind Datetime kind.
DateTimeDataKind sourceFormat Datetime format.
DateTimeFormat target Destination datetime array.
Array targetKind Datetime kind.
Int32 targetFormat Datetime format.
DateTimeDataKind srcStartPos Starting index of the source array.
DateTimeFormat dstStartPos Starting index of the destination array.

void MoveToDateTimeArrayWithPad(Array source, int srcStartPos, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

RPG’s MOVEA. Moves source array to destination datetime array, padding the result.

void MoveToDateTimeArrayWithPad(Array source, int srcStartPos, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

Parameters

Type Parameter name Description
Array source Source array.
Int32 target Destination datetime array.
Array targetKind Datetime kind.
Int32 targetFormat Datetime format.
DateTimeDataKind srcStartPos Starting index of the source array.
DateTimeFormat dstStartPos Starting index of the destination array.

void MoveToDateTimeArrayWithPad(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

RPG’s MOVEA. Moves source array to destination datetime array, padding the result.

void MoveToDateTimeArrayWithPad(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

Parameters

Type Parameter name Description
Array source Source fixed decimal array.
Int32 sourceDec Number of decimals in source.
Int32 target Destination datetime array.
Array targetKind Datetime kind.
Int32 targetFormat Datetime format.
DateTimeDataKind srcStartPos Starting index of the source array.
DateTimeFormat dstStartPos Starting index of the destination array.

void MoveToDateTimeArrayWithPad(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

RPG’s MOVEA. Moves source datetime array to destination datetime array, padding the result.

void MoveToDateTimeArrayWithPad(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, DateTimeDataKind targetKind, DateTimeFormat targetFormat)

Parameters

Type Parameter name Description
Array source Source datetime array.
Int32 sourceKind Datetime kind.
DateTimeDataKind sourceFormat Datetime format.
DateTimeFormat target Destination datetime array.
Array targetKind Datetime kind.
Int32 targetFormat Datetime format.
DateTimeDataKind srcStartPos Starting index of the source array.
DateTimeFormat dstStartPos Starting index of the destination array.

void MoveToNumericArray(Array source, int srcStartPos, Array target, int dstStartPos)

RPG’s MOVEA. Moves source array to destination numeric array.

void MoveToNumericArray(Array source, int srcStartPos, Array target, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source array with compatible type for move to numeric.
Int32 target Destination array with compatible type for move.
Array srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArray(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos)

RPG’s MOVEA. Moves source array to destination numeric array.

void MoveToNumericArray(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source fixed decimal array.
Int32 sourceDec Number of decimals in source.
Int32 target Destination array with compatible type for move.
Array srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArray(Array source, int srcStartPos, Array target, int dstStartPos, int targetDig, int targetDec)

RPG’s MOVEA. Moves source array to destination fixed decimal array.

void MoveToNumericArray(Array source, int srcStartPos, Array target, int dstStartPos, int targetDig, int targetDec)

Parameters

Type Parameter name Description
Array source Source array.
Int32 target Destination fixed decimal array.
Array targetDig Number of digits in target.
Int32 targetDec Number of decimals in target.
Int32 srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArray(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, int targetDig, int targetDec)

RPG’s MOVEA. Moves source fixed decimal array to destination fixed decimal array.

void MoveToNumericArray(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, int targetDig, int targetDec)

Parameters

Type Parameter name Description
Array source Source fixed decimal array.
Int32 sourceDec Number of decimals in source.
Int32 target Destination fixed decimal array.
Array targetDig Number of digits in target.
Int32 targetDec Number of decimals in target.
Int32 srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArray(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos)

RPG’s MOVEA. Moves source datetime array to destination numeric array.

void MoveToNumericArray(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source datetime array.
Int32 sourceKind Datetime kind.
DateTimeDataKind sourceFormat Datetime format.
DateTimeFormat target Destination numeric array.
Array srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArray(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, int targetDig, int targetDec)

RPG’s MOVEA. Moves source datetime array to destination fixed decimal array.

void MoveToNumericArray(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, int targetDig, int targetDec)

Parameters

Type Parameter name Description
Array source Source datetime array.
Int32 sourceKind Datetime kind.
DateTimeDataKind sourceFormat Datetime format.
DateTimeFormat target Destination fixed decimal array.
Array targetDig Number of digits in target.
Int32 targetDec Number of decimals in target.
Int32 srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, Array target, int dstStartPos)

RPG’s MOVEA. Moves source array to destination numeric array, padding the result.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, Array target, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source array with compatible type for move to numeric.
Int32 target Destination array with compatible type for move.
Array srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos)

RPG’s MOVEA. Moves source array to destination numeric array, padding the result.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source fixed decimal array.
Int32 sourceDec Number of decimals in source.
Int32 target Destination array with compatible type for move.
Array srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, Array target, int dstStartPos, int targetDig, int targetDec)

RPG’s MOVEA. Moves source array to destination fixed decimal array, padding the result.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, Array target, int dstStartPos, int targetDig, int targetDec)

Parameters

Type Parameter name Description
Array source Source array.
Int32 target Destination fixed decimal array.
Array targetDig Number of digits in target.
Int32 targetDec Number of decimals in target.
Int32 srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, int targetDig, int targetDec)

RPG’s MOVEA. Moves source fixed decimal array to destination fixed decimal array, padding the result.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, int sourceDec, Array target, int dstStartPos, int targetDig, int targetDec)

Parameters

Type Parameter name Description
Array source Source fixed decimal array.
Int32 sourceDec Number of decimals in source.
Int32 target Destination fixed decimal array.
Array targetDig Number of digits in target.
Int32 targetDec Number of decimals in target.
Int32 srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos)

RPG’s MOVEA. Moves source datetime array to destination numeric array, padding the result.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos)

Parameters

Type Parameter name Description
Array source Source datetime array.
Int32 sourceKind Datetime kind.
DateTimeDataKind sourceFormat Datetime format.
DateTimeFormat target Destination numeric array.
Array srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, int targetDig, int targetDec)

RPG’s MOVEA. Moves source datetime array to destination fixed decimal array, padding the result.

void MoveToNumericArrayWithPad(Array source, int srcStartPos, DateTimeDataKind sourceKind, DateTimeFormat sourceFormat, Array target, int dstStartPos, int targetDig, int targetDec)

Parameters

Type Parameter name Description
Array source Source datetime array.
Int32 sourceKind Datetime kind.
DateTimeDataKind sourceFormat Datetime format.
DateTimeFormat target Destination fixed decimal array.
Array targetDig Number of digits in target.
Int32 targetDec Number of decimals in target.
Int32 srcStartPos Starting index of the source array.
Int32 dstStartPos Starting index of the destination array.

string MoveToString(Array source, int startPosition, string target)

RPG’s MOVEA. Moves source array to destination string.

string MoveToString(Array source, int startPosition, string target)

Parameters

Type Parameter name Description
Array source Source Array.
Int32 startPosition The array element where the copy starts.
String target Destination string.

Returns

Type Description
String Returns string value of the move.

string MoveToStringWithPad(Array source, int startPosition, string target)

RPG’s MOVEA. Moves source array to destination string, padding on the left with blanks.

string MoveToStringWithPad(Array source, int startPosition, string target)

Parameters

Type Parameter name Description
Array source Source Array.
Int32 startPosition The array element where the copy starts.
String target Destination string.

Returns

Type Description
String Returns string value of the move.

void SortArr(Array arrayToSort)

RPG’s SORTARR. Sorts given array in ascending order.

void SortArr(Array arrayToSort)

Parameters

Type Parameter name Description
Array arrayToSort Array to sort.

void SortArr(Array arrayToSort, Array baseArray)

RPG’s SORTARR. Sorts a pair of arrays in ascending order, one containing the keys and the other the corresponding items.

void SortArr(Array arrayToSort, Array baseArray)

Parameters

Type Parameter name Description
Array arrayToSort The one-dimensional, zero-based System.Array that contains the keys to sort.
Array baseArray The one-dimensional, zero-based System.Array that contains the items that correspond to the keys in arrayToSort.

void SortArrReverse(Array arrayToSort)

RPG’s SORTARR. Sorts given array in descending order.

void SortArrReverse(Array arrayToSort)

Parameters

Type Parameter name Description
Array arrayToSort Array to sort.

void SortArrReverse(Array arrayToSort, Array baseArray)

RPG’s SORTARR. Sorts given array in descending order, one containing the keys and the other the corresponding items.

void SortArrReverse(Array arrayToSort, Array baseArray)

Parameters

Type Parameter name Description
Array arrayToSort The one-dimensional, zero-based System.Array that contains the keys to sort.
Array baseArray The one-dimensional, zero-based System.Array that contains the items that correspond to the keys in arrayToSort.