GetObject class | QSYS API Reference Guide

Estimated reading time: 5 minutes

Class that contains methods to construct certain RPG objects.

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

Inheritance: Object

Methods

Signature Description
MaxFixedDecimalValue(Int32, Int32) RPG’s *HIVAL. Create a fixed decimal high value for the length and decimal positions given.
MinFixedDecimalValue(Int32, Int32) RPG’s *LOVAL. Create a fixed decimal low value for the length and decimal positions given.
NewIndicatorArray(Int32[]) Creates a new array of characters initialized to ‘0’
NewStringArray(Int32[], Int32) Creates a new array of fixed-length strings initialized to a string of blanks.
RepeatAndMakeInt(String) RPG’s *ALL. Creates an integer by repeating the digits in the pattern multiple times.
RepeatAndMakeLong(String) RPG’s *ALL. Creates a long by repeating the digits in the pattern multiple times.
RepeatAndMakeShort(String) RPG’s *ALL. Creates a short by repeating the digits in the pattern multiple times.
RepeatDecimals(String, Int32, Int32) RPG’s *ALL. Creates a decimal number by repeating the digits in the pattern multiple times.
RepeatString(String, Int32) RPG’s *ALL. Creates a string of the indicated length by repeating the pattern multiple times.

decimal MaxFixedDecimalValue(int length, int decimals)

RPG’s *HIVAL. Create a fixed decimal high value for the length and decimal positions given.

decimal MaxFixedDecimalValue(int length, int decimals)

Parameters

Type Parameter name Description
Int32 length Desired length of the decimal number.
Int32 decimals Number of desired decimal positions.

Returns

Type Description
Decimal The *HIVAL decimal number of the proper size.

decimal MinFixedDecimalValue(int length, int decimals)

RPG’s *LOVAL. Create a fixed decimal low value for the length and decimal positions given.

decimal MinFixedDecimalValue(int length, int decimals)

Parameters

Type Parameter name Description
Int32 length Desired length of the decimal number.
Int32 decimals Number of desired decimal positions.

Returns

Type Description
Decimal The *LOVAL decimal number of the proper size.

Array NewIndicatorArray(Int32[] dimensions)

Creates a new array of characters initialized to ‘0’

Array NewIndicatorArray(Int32[] dimensions)

Parameters

Type Parameter name Description
Int32[] dimensions Array dimensions.

Returns

Type Description
Array The array of indicators.

Array NewStringArray(Int32[] dimensions, int length)

Creates a new array of fixed-length strings initialized to a string of blanks.

Array NewStringArray(Int32[] dimensions, int length)

Parameters

Type Parameter name Description
Int32[] dimensions Array dimensions.
Int32 length Length of the strings in the array.

Returns

Type Description
Array The array of fixed-length strings.

int RepeatAndMakeInt(string pattern)

RPG’s *ALL. Creates an integer by repeating the digits in the pattern multiple times.

int RepeatAndMakeInt(string pattern)

Parameters

Type Parameter name Description
String pattern The repeating pattern.

Returns

Type Description
Int32 The largest integer number that can be formed repeating the pattern of digits.

long RepeatAndMakeLong(string pattern)

RPG’s *ALL. Creates a long by repeating the digits in the pattern multiple times.

long RepeatAndMakeLong(string pattern)

Parameters

Type Parameter name Description
String pattern The repeating pattern.

Returns

Type Description
Int64 The largest long number that can be formed repeating the pattern of digits.

short RepeatAndMakeShort(string pattern)

RPG’s *ALL. Creates a short by repeating the digits in the pattern multiple times.

short RepeatAndMakeShort(string pattern)

Parameters

Type Parameter name Description
String pattern The repeating pattern.

Returns

Type Description
Int16 The largest short number that can be formed repeating the pattern of digits.

decimal RepeatDecimals(string pattern, int digits, int decimals)

RPG’s *ALL. Creates a decimal number by repeating the digits in the pattern multiple times.

decimal RepeatDecimals(string pattern, int digits, int decimals)

Parameters

Type Parameter name Description
String pattern The repeating pattern.
Int32 digits The length of the resulting decimal number.
Int32 decimals The decimal positions of the result.

Returns

Type Description
Decimal The decimal number with the repeating digit pattern in the proper length.

string RepeatString(string pattern, int length)

RPG’s *ALL. Creates a string of the indicated length by repeating the pattern multiple times.

string RepeatString(string pattern, int length)

Parameters

Type Parameter name Description
String pattern The repeating pattern.
Int32 length The desired string length.

Returns

Type Description
String The string with the repeating pattern, of the proper length.