public class Builtin
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Pointer<?> |
NULL
NULL() function and NULL constant
|
static int |
RC |
Constructor and Description |
---|
Builtin() |
Modifier and Type | Method and Description |
---|---|
static java.math.BigDecimal |
ABS(java.math.BigDecimal X)
Return the absolute value of the argument.
|
static java.math.BigInteger |
ABS(java.math.BigInteger X)
Return the absolute value of the argument.
|
static java.lang.Byte |
ABS(java.lang.Byte X)
Return the absolute value of the argument.
|
static Complex |
ABS(Complex X)
Return the absolute value of the argument.
|
static java.lang.Double |
ABS(java.lang.Double X)
Return the absolute value of the argument.
|
static FixedBin |
ABS(FixedBin X)
Return the absolute value of the argument.
|
static java.lang.Float |
ABS(java.lang.Float X)
Return the absolute value of the argument.
|
static java.lang.Integer |
ABS(java.lang.Integer X)
Return the absolute value of the argument.
|
static java.lang.Long |
ABS(java.lang.Long X)
Return the absolute value of the argument.
|
static Picture |
ABS(Picture X)
Return the absolute value of the argument.
|
static java.lang.Short |
ABS(java.lang.Short X)
Return the absolute value of the argument.
|
static java.math.BigDecimal |
ADD(java.lang.Object X,
java.lang.Object Y,
int P,
int Q)
ADD returns the sum of x and y with a precision specified by p and q.
|
static Pointer<?> |
ADDR(java.lang.Object ref,
java.lang.Class<?> outerClass,
java.lang.Object This)
ADDR returns the pointer value that identifies the generation of outerClass mapped
to the object ref.
|
static Pointer<?> |
ADDR(Pointer<?> ptr,
java.lang.Object toModel)
ADDR simulates taking the address of one variable to be used as a base for another
using handles (Pointer to a Pointer).
|
static java.lang.Integer |
ALLOCATION(java.util.Stack<?> x)
ALLOCATION returns a FIXED BINARY(31,0) specifying the number of
generations that can be accessed in the current program for x.
|
static void |
CALLCOBOL(java.lang.String pgmName,
com.heirloomcomputing.ecs.exec.Context context,
java.lang.Object... actualParameters)
invoke the Elastic COBOL program with the given (PL/I as COBOL) parameters, setting up
an Elastic COBOL program Context if need be.
|
static java.lang.Object |
CALLCOBOLGIVING(java.lang.String pgmName,
com.heirloomcomputing.ecs.exec.Context context,
java.lang.Class<?> returnType,
java.lang.Object... actualParameters)
invoke the Elastic COBOL program with the given (PL/I as COBOL) parameters, setting up
an Elastic COBOL program Context if need be, and return a result object
|
static java.lang.Object |
CEIL(java.lang.Object X)
CEIL determines the smallest integer value greater than or
equal to x, and assigns this value to the result.
|
static java.lang.String |
CHARACTER(java.lang.Object X,
int Y)
CHARACTER returns the character value of x, with a length specified by y.
|
static java.lang.String |
COLLATE()
COLLATE returns a CHARACTER(256) string comprising the 256 possible
CHARACTER(1) values one time each in the collating order.
|
static int |
compareTo(java.lang.Byte op1,
BitN op2)
compare two Elastic PL/I primitive types
|
static java.lang.String |
COUNTER()
COUNTER returns a CHARACTER string of length 5 containing a decimal
number.
|
static java.lang.Integer |
CURRENTSIZE(java.lang.Object x)
CURRENTSIZE returns a FIXED BIN value that gives the implementation-defined
storage, in bytes, required by x
|
static java.lang.String |
DATE()
DATE returns a nonvarying character(6) string containing the date in the format,
YYMMDD.
|
static java.lang.String |
DATETIME(java.lang.String Y)
DATETIME returns a character string timestamp of today's date in either the
default format or a user-specified format.
|
static java.lang.Integer |
DAYS(java.lang.String D,
java.lang.String P,
java.lang.Integer W)
DAYS returns a FIXED BINARY(31,0) value that is the number of days (in Lilian
format) corresponding to the date d
|
static java.lang.String |
DAYSTODATE(java.lang.Integer D,
java.lang.String P,
java.lang.Integer W)
DAYSTODATE returns a nonvarying character string containing the date in the
form p that corresponds to d days (in Lilian format).
|
static java.lang.Double |
DAYSTOSECS(java.lang.Integer D)
DAYSTOSECS returns a FLOAT BINARY(53) value that is the number of seconds
corresponding to the number of days x.
|
static java.lang.Integer |
DIMENSION(Array<?> x,
java.lang.Integer y)
DIMENSION returns a FIXED BINARY value that specifies the current extent of
dimension y of x.
|
static java.lang.Object |
DIVIDE(java.lang.Object X,
java.lang.Object Y,
int P,
int Q)
DIVIDE returns the quotient of x/y with a precision specified by p and q.
|
static void |
ENTRYADDR(Entry lhs,
Entry rhs)
assign the Entry variable the address of the Entry point
|
static java.lang.Object |
EXP(java.lang.Object X)
EXP returns a floating-point value that is an approximation of the base, e, of the
natural logarithm system raised to the power x.
|
static java.lang.Object |
EXP(java.lang.Object X,
int P,
int Q)
EXP(X, P, Q) same as EPLIConversion.Precision(EXP(X), P, Q)
|
static FixedBin |
FIXEDBIN(java.lang.Object X,
int P,
int Q)
FIXEDBIN returns a FIXED BIN value with precision and scale derived from the
source unless explicitly specified as parameters to the function.
|
static java.math.BigDecimal |
FIXEDDEC(java.lang.Object X,
int P,
int Q)
FIXEDDEC returns a FIXED DEC value with precision and scale derived from the
source unless explicitly specified as parameters to the function.
|
static java.lang.Object |
FLOATBIN(java.lang.Object X,
int P,
int Q)
FLOATBIN returns a FLOAT BIN value with precision and scale derived from the
source unless explicitly specified as parameters to the function.
|
static java.math.BigDecimal |
FLOATDEC(java.lang.Object X,
int P,
int Q)
FLOATDEC returns a FLOAT DEC value with precision and scale derived from the
source unless explicitly specified as parameters to the function.
|
static java.lang.Object |
FLOOR(java.lang.Object X)
FLOOR determines the greatest integer value less than or
equal to x, and assigns this value to the result.
|
static java.lang.Integer |
HBOUND(Array<?> x,
java.lang.Integer y)
HBOUND returns a FIXED BINARY value that specifies the current upper bound
of dimension y of x.
|
static java.lang.String |
HEX(java.lang.Object X,
java.lang.String Y)
HEX returns a character string that is the hexadecimal representation of the storage
that contains X in which every 8 characters of the result has Y inserted, if given.
|
static Complex |
IMAG(Complex c1,
java.lang.Object c2)
replace the imaginary portion of a Complex number
|
static java.lang.Integer |
INDEX(java.lang.String var,
java.lang.String search,
int start)
INDEX returns an unscaled REAL FIXED BINARY value indicating the starting
position within x of a substring identical to y when the search for y starts from the
left end of x.
|
static java.lang.Integer |
INDEXR(java.lang.String var,
java.lang.String search,
int start)
INDEXR returns an unscaled REAL FIXED BINARY value indicating the starting
position within x of a substring identical to y when the search for y starts from the
right end of x.
|
static java.lang.Integer |
LBOUND(Array<?> x,
java.lang.Integer y)
LBOUND returns a FIXED BINARY value that specifies the current lower bound
of dimension y of x.
|
static java.lang.Object |
LOG(java.lang.Object X)
LOG returns a floating-point value that is an approximation of the natural
logarithm (the logarithm to the base e) of x.
|
static java.lang.Object |
LOG(java.lang.Object X,
int P,
int Q)
LOG returns same as LOG(X) trimmed to a specific precision and scale
|
static void |
main(java.lang.String[] args) |
static java.lang.Object |
MAX(java.lang.Object D,
java.lang.Object R,
java.lang.Object... X)
Take the maximum value of its (multiple) arguments which
may be mixed of CHAR and CODED ARITHMETIC data types including
String, Byte, Short, Integer, Long, FixedBin,
BigInteger, BigDecimal, Float or Double.
|
static java.lang.Object |
MIN(java.lang.Object D,
java.lang.Object R,
java.lang.Object... X)
Take the minimum value of its (multiple) arguments which
may be mixed of CHAR and CODED ARITHMETIC data types including
String, Byte, Short, Integer, Long, FixedBin,
BigInteger, BigDecimal, Float or Double.
|
static java.lang.Object |
MOD(java.lang.Object X,
java.lang.Object Y)
MOD determines the modulus of an integer value by another integer.
|
static java.lang.Object |
MULTIPLY(java.lang.Object X,
java.lang.Object Y,
int P,
int Q)
MULTIPLY returns the product of x and y, with a precision specified by p and q.
|
static java.lang.String |
ONCHAR()
ONCHAR returns single character on which a ONCHAR condition was raised
|
static void |
ONCHAR(java.lang.String x)
ONCHAR sets the ONCHAR character returned by the ONCHAR() built-in function
|
static java.lang.String |
ONSOURCE()
ONSOURCE returns the String set through the ONSOURCE(x) pseudo-variable
or raised as part of the CONVERSION condition
|
static void |
ONSOURCE(java.lang.String x)
ONSOURCE sets the ONSOURCE character returned by the ONSOURCE() built-in function
|
static java.lang.String |
PLIDUMP(java.lang.Object... argument)
The PLIDUMP subroutine allows you to obtain a formatted dump of selected parts
of storage that is used by your program.
|
static void |
PLIEXIT()
The PLIEXIT built-in subroutine is invoked by the STOP and EXIT statements with
exit code 0 or that set with the CALL PLIRETC() built-in subroutine.
|
static void |
PLIRETC(java.lang.Integer X)
The PLIRETC built-in subroutine allows you to set a return code that can be examined by
the program that invoked this PL/I program or by another PL/I procedure via the
PLIRETV built-in function.
|
static java.lang.Integer |
PLIRETV()
PLIRETV returns a FIXED BINARY(31,0) value that is the PL/I return code.
|
static java.lang.Object |
PRECISION(java.lang.Object X,
int P,
int Q)
PRECISION returns the value of x, with a precision specified by p and q.
|
static java.lang.Double |
RANDOM()
RANDOM returns a random number
|
static java.lang.Double |
RANDOM(int X)
RANDOM returns a random number and sets the seed to
the random number generator
|
static Complex |
REAL(Complex c1,
java.lang.Object c2)
replace the real portion of a Complex number
|
static java.lang.Object |
REM(java.lang.Object X,
java.lang.Object Y)
REM determines the remainder of a modulus of an integer value by another integer.
|
static java.lang.String |
REPEAT(java.lang.String X,
int Y)
REPEAT returns a bit, character, graphic or widechar string consisting of x
concatenated to itself the number of times specified by y.
|
static java.lang.Object |
ROUND(java.lang.Object X,
int N)
ROUND returns the value of x rounded at a digit specified by n.
|
static java.math.BigDecimal |
ROUNDDEC(java.math.BigDecimal X,
int N)
ROUNDDEC returns the value of x rounded at a digit specified by n.
|
static java.lang.Double |
SECS(java.lang.String D,
java.lang.String P,
java.lang.Integer W)
SECS returns a FLOAT BINARY(53) value that is the number of seconds (based on
Lilian format) corresponding to the date d.
|
static java.lang.String |
SECSTODATE(java.lang.Double D,
java.lang.String P,
java.lang.Integer W)
SECSTODATE returns a nonvarying character string containing the date in the
date/time pattern specified by p that corresponds to d seconds (based on Lilian
format).
|
static java.lang.Integer |
SECSTODAYS(java.lang.Double D)
SECSTODAYS returns a FIXED BINARY(31,0) value that represents the number of
seconds x converted to days, ignoring incomplete days.
|
static java.lang.Integer |
SIGN(java.lang.Object X)
SIGN returns an unscaled REAL FIXED BINARY value that indicates whether x is positive, zero, or negative.
|
static java.lang.Integer |
SIZE(java.lang.Object x,
int dclsize)
SIZE returns a FIXED BIN value that gives the implementation-defined storage, in
bytes, allocated to a variable x
|
static java.lang.String |
STRING(java.lang.Object x)
STRING returns a string that is the concatenation of all the elements of x.
|
static int |
STRING(Pointer<?> destptr,
java.lang.String source)
The STRING pseudovariable assigns a string to x as if x were a string scalar.
|
static java.lang.String |
SUBSTR(java.lang.String x,
int y,
int z)
SUBSTR returns a substring, specified by y and z, of x.
|
static java.lang.String |
SUBSTR(java.lang.String lhs,
int x,
int y,
java.lang.String rhs)
the SUBSTR pseudo-variable
replace characters within a String and return it for assignment.
|
static java.lang.Object |
SUBTRACT(java.lang.Object X,
java.lang.Object Y,
int P,
int Q)
SUBTRACT is equivalent to ADD(x,-y,p,q).
|
static java.lang.Integer |
SYSTEM(java.lang.String cmd)
SYSTEM(x) returns a FIXED BIN(31,0) value that is the return value from the
command processor when it is invoked with the command contained in x.
|
static java.lang.String |
TIME()
TIME returns a character string timestamp in the format HHMISS999.
|
static java.lang.String |
TRANSLATE(java.lang.String X,
java.lang.String Y,
java.lang.String Z)
TRANSLATE returns a character string of the same length as x
|
static java.lang.Integer |
TRUNC(java.lang.Object X)
TRUNC returns returns an integer value that is the truncated value of x.
|
static java.lang.Object |
TYPE(java.lang.Object rhs)
The TYPE pseudovariable assigns a typed structure or union to the storage
located by the handle x.
|
static BitN |
UNSPEC(java.lang.Object X)
UNSPEC function returns a bit string that is the internal coded form of x.
|
static java.lang.Object |
UNSPEC(Pointer<?> dest,
java.lang.Object source)
The UNSPEC pseudovariable assigns a bit value directly to x; that is, without
conversion.
|
static java.lang.Integer |
VERIFY(java.lang.String X,
java.lang.String Y,
java.lang.Integer N)
Returns an unscaled Integer value that indicates the
position in x of the leftmost character, widechar, graphic, or bit that
is not in y.
|
public static int RC
public static final Pointer<?> NULL
public static java.lang.Byte ABS(java.lang.Byte X)
X
- - number to take the absolute value ofpublic static java.lang.Short ABS(java.lang.Short X)
X
- - number to take the absolute value ofpublic static java.lang.Integer ABS(java.lang.Integer X)
X
- - number to take the absolute value ofpublic static java.lang.Long ABS(java.lang.Long X)
X
- - number to take the absolute value ofpublic static java.lang.Float ABS(java.lang.Float X)
X
- - number to take the absolute value ofpublic static java.lang.Double ABS(java.lang.Double X)
X
- - number to take the absolute value ofpublic static FixedBin ABS(FixedBin X)
X
- - number to take the absolute value ofpublic static java.math.BigDecimal ABS(java.math.BigDecimal X)
X
- - number to take the absolute value ofpublic static java.math.BigInteger ABS(java.math.BigInteger X)
X
- - number to take the absolute value ofpublic static Complex ABS(Complex X)
X
- - number to take the absolute value ofpublic static Picture ABS(Picture X)
X
- - number to take the absolute value ofpublic static java.lang.Object CEIL(java.lang.Object X)
X
- - number to take the ceiling ofpublic static java.lang.Object MOD(java.lang.Object X, java.lang.Object Y)
X
- - number to take the ceiling ofpublic static java.lang.Object REM(java.lang.Object X, java.lang.Object Y)
X
- - number to take the ceiling ofpublic static java.lang.Object FLOOR(java.lang.Object X)
X
- - number to take the ceiling ofpublic static int compareTo(java.lang.Byte op1, BitN op2)
op1
- - any of the base EPLITYPESop2
- - any of the base EPLITYPESpublic static java.lang.Object MAX(java.lang.Object D, java.lang.Object R, java.lang.Object... X)
D
- - a return object type, with implied precision and scale.
not considered part of the MAX calculation but will be returned
as the function result if an error occurs, like not a type that
can be converted into CODED ARITHMETIC form.R
- - Object - the first argument to take the maximum of.X
- - Object - the subsequent arguments to take the maximum of.public static java.lang.Object MIN(java.lang.Object D, java.lang.Object R, java.lang.Object... X)
D
- - a return object type, with implied precision and scale.
not considered part of the MAX calculation but will be returned
as the function result if an error occurs, like not a type that
can be converted into CODED ARITHMETIC form.R
- - Object - the first argument to take the maximum of.X
- - Object - the subsequent arguments to take the maximum of.public static java.math.BigDecimal ADD(java.lang.Object X, java.lang.Object Y, int P, int Q)
X
- - expression.Y
- - expression.P
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.lang.Object SUBTRACT(java.lang.Object X, java.lang.Object Y, int P, int Q)
X
- - expression.Y
- - expression.P
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.lang.Object MULTIPLY(java.lang.Object X, java.lang.Object Y, int P, int Q)
X
- - expression.Y
- - expression.P
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.lang.Object DIVIDE(java.lang.Object X, java.lang.Object Y, int P, int Q)
X
- - expression of the dividend.Y
- - expression of the divisor. if y=0 the ZERODIVIDE condition is raisedP
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.lang.Object EXP(java.lang.Object X)
X
- - expression in any CODEDARITHMETIC data type.SIZE
- CONDITION if result is Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITYpublic static java.lang.Object EXP(java.lang.Object X, int P, int Q)
X
- - expression in any CODEDARITHMETIC data type.P
- - the requested precision number of binary digits of the resultQ
- - the requested scale number of binary digits of the resultSIZE
- CONDITION if result is Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY
or loss of precision would resultpublic static java.lang.Object LOG(java.lang.Object X)
X
- - expression must be greater than zero CODEDARITHMETIC data typeSIZE
- CONDITION if result is Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITYpublic static java.lang.Object LOG(java.lang.Object X, int P, int Q)
X
- - expression must be greater than zero CODEDARITHMETIC data typeP
- - the requested precision number of binary digits of the resultQ
- - the requested scale number of binary digits of the resultSIZE
- CONDITION if result is Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY
or loss of precision would resultpublic static java.math.BigDecimal FIXEDDEC(java.lang.Object X, int P, int Q)
X
- - expression of the dividend.P
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.math.BigDecimal FLOATDEC(java.lang.Object X, int P, int Q)
X
- - expression of the dividend.P
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.lang.String CHARACTER(java.lang.Object X, int Y)
X
- - Expression. X must have a computational type.Y
- - Expression. If necessary, Y is converted to a real fixed-point binary value.
If Y is omitted, the length is determined by the rules for type conversion.
Y cannot be negative. If Y = 0, the result is the null character string.public static java.lang.String HEX(java.lang.Object X, java.lang.String Y)
X
- - Expression that represents any variable. The whole number of bytes that
contain x is converted to hexadecimal.Y
- - Expression. If specified, z must have the type CHARACTER(1) NONVARYING.public static FixedBin FIXEDBIN(java.lang.Object X, int P, int Q)
X
- - expression of the dividend.P
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.lang.Object FLOATBIN(java.lang.Object X, int P, int Q)
X
- - expression of the dividend.P
- - Restricted expression specifying the number of digits to
be maintained throughout the operation.Q
- - Restricted expression specifying the scaling factor of the
result. For a fixed-point result, if q is omitted, a scaling
factor of zero is the default. For a floating-point result, q must
be omitted.public static java.lang.Object ROUND(java.lang.Object X, int N)
X
- - Any CODEDARITHMETIC. If x is negative, the absolute value is rounded and the sign is restoredN
- - Optional signed integer. It specifies the digit at which rounding is to occurpublic static java.math.BigDecimal ROUNDDEC(java.math.BigDecimal X, int N)
X
- - Decimal expression. If x is negative, the absolute value is rounded and the sign is restoredN
- - Optional signed integer. It specifies the digit at which rounding is to occurpublic static java.lang.Integer SIGN(java.lang.Object X)
X
- - Arithmetic expression to testpublic static java.lang.Integer TRUNC(java.lang.Object X)
X
- - Arithmetic expression to truncatepublic static java.lang.String ONCHAR()
public static java.lang.String ONSOURCE()
public static java.lang.Double RANDOM(int X)
X
- - a number to use as a seed for future random numbers)public static java.lang.Double RANDOM()
public static java.lang.String REPEAT(java.lang.String X, int Y)
X
- - string to repeat (e.g., 'the quick brown fox jumped over the lazy dog')Y
- - number of times to repeat (0 meaning X is returned)public static java.lang.Integer VERIFY(java.lang.String X, java.lang.String Y, java.lang.Integer N)
X
- - string to verify (e.g., 'the quick brown fox jumped over the lazy dog')Y
- - chars to verify X against (e.g., 'abcdefghijklmnopqrstuvwxyz')N
- - where to start in X (e.g., 1) [optional]public static void ENTRYADDR(Entry lhs, Entry rhs)
lhs
- - the original Entry variablerhs
- - the Entry constant
Note: compiler generates in-line code for this pseudo-variablepublic static Complex IMAG(Complex c1, java.lang.Object c2)
c1
- - the original Complex number containing the real partc2
- - the imaginary part that should replace itCONVERSION
- condition if could not convertpublic static void ONCHAR(java.lang.String x)
x
- - a String the first character of which will be returned by ONCHAR()
Note: also used in ONWCHARpublic static void ONSOURCE(java.lang.String x)
x
- - a String the first character of which will be returned by ONCHAR()
Note: also used in ONWSOURCE, ONGSOURCEpublic static Complex REAL(Complex c1, java.lang.Object c2)
c1
- - the original Complex number containing the imaginary partc2
- - the real part that should replace itCONVERSION
- condition if could not convertpublic static java.lang.String DATE()
public static java.lang.String TIME()
public static java.lang.String DATETIME(java.lang.String Y)
Y
- - optional CHAR format for the returned stringpublic static java.lang.Integer DAYS(java.lang.String D, java.lang.String P, java.lang.Integer W)
D
- - optional - the date/time to examine, DATETIME() if nullP
- - optional - the date/time format, format of DATETIME() if nullW
- - optional - An integer expression that defines a century window
to be used to handle any two-digit year formats.
1) If the value is positive, such as 1950, it is treated as a year.
2) If negative or zero, the value specifies an offset to be subtracted from the
current, system-supplied year.
3) If omitted, w defaults to the value specified in the WINDOW compile-time option.public static java.lang.String DAYSTODATE(java.lang.Integer D, java.lang.String P, java.lang.Integer W)
D
- - the number of days (in Lilian format). d must have a computational
type and is converted to FIXED BINARY(31,0) if necessaryP
- - optional - the date/time format, format of DATETIME() if nullW
- - optional - An integer expression that defines a century window
to be used to handle any two-digit year formats.
1) If the value is positive, such as 1950, it is treated as a year.
2) If negative or zero, the value specifies an offset to be subtracted from the
current, system-supplied year.
3) If omitted, w defaults to the value specified in the WINDOW compile-time option.public static java.lang.Double DAYSTOSECS(java.lang.Integer D)
D
- - the number of days (in Lilian format). d must have a computational
type and is converted to FIXED BINARY(31,0) if necessarypublic static java.lang.Double SECS(java.lang.String D, java.lang.String P, java.lang.Integer W)
D
- -optional - A string expression representing a date. If present, d specifies the input date as
a character string representing the date/time specified in the pattern p. If d is
missing, it is assumed to be DATETIME().
D must have a computational type and should have character type. If not, it is
converted to character.P
- - optional - the date/time format, format of DATETIME() if nullW
- - optional - An integer expression that defines a century window
to be used to handle any two-digit year formats.
1) If the value is positive, such as 1950, it is treated as a year.
2) If negative or zero, the value specifies an offset to be subtracted from the
current, system-supplied year.
3) If omitted, w defaults to the value specified in the WINDOW compile-time option.public static java.lang.String SECSTODATE(java.lang.Double D, java.lang.String P, java.lang.Integer W)
D
- - the number of seconds (in Lilian format). d must have a computational
type and is converted to FIXED BINARY(31,0) if necessaryP
- - optional - the date/time format, format of DATETIME() if nullW
- - optional - An integer expression that defines a century window
to be used to handle any two-digit year formats.
1) If the value is positive, such as 1950, it is treated as a year.
2) If negative or zero, the value specifies an offset to be subtracted from the
current, system-supplied year.
3) If omitted, w defaults to the value specified in the WINDOW compile-time option.public static java.lang.Integer SECSTODAYS(java.lang.Double D)
D
- - Expression. The value for x must have computational type and should be
FLOAT BINARY(53). If not, it is converted to FLOAT BINARY(53)public static java.lang.String COLLATE()
Elastic PL/I Note: the String contains the unicode chars from 0 to 256 in the default code page, of which 0xfe and 0xff have special significance
public static java.lang.String COUNTER()
public static int STRING(Pointer<?> destptr, java.lang.String source)
destptr
- - a pointer to a Group or other variable to be assignedsource
- - a String to be used as the source of the assignmentSTRINGRANGE
- condition if x or y are out-of-range of lhs
note: ignore code page issues (like 0xffef unicode markers)public static java.lang.Integer INDEX(java.lang.String var, java.lang.String search, int start)
var
- - the string to searchsearch
- the string to search forstart
- the starting location (default 1)public static java.lang.Integer INDEXR(java.lang.String var, java.lang.String search, int start)
var
- - the string to searchsearch
- the string to searchstart
- the starting location (default end-of-string), if "not specified"
(it is optional in INDEXR), 0 is passed to indicate thispublic static java.lang.String STRING(java.lang.Object x)
x
- Aggregate or element reference.public static java.lang.String SUBSTR(java.lang.String x, int y, int z)
x
- String expression. It specifies the string from which the substring is extracted.
If x is not a string, it is converted to character.y
- Expression that is converted to FIXED BINARY(31,0). y specifies the starting
position of the substring in x.z
- Expression that is converted to FIXED BINARY(31,0). z specifies the length of
the substring in x. If z is zero, a null string is returned. If z is omitted (-1), the
substring returned is position y in x to the end of x.CONDITION(STRINGRANGE)
- if an arg is out-of-rangepublic static java.lang.String SUBSTR(java.lang.String lhs, int x, int y, java.lang.String rhs)
lhs
- - the left-hand-side, generally a Groupx
- - the start within lhs of the replacementy
- - the length of the chars within lhs that should be replacedrhs
- - the characters (trimmed/padded to length y) to be used as
the replacementSTRINGRANGE
- condition if x or y are out-of-range of lhspublic static java.lang.String TRANSLATE(java.lang.String X, java.lang.String Y, java.lang.String Z)
X
- - Character expression to be searched for possible translation of its characters.Y
- - Character expression containing the translation values of characters.Z
- - Character expression containing the characters that are to be translated. If z is
omitted, it defaults to collate().TRANSLATE operates on each character of x as follows: If a character in x is found in z, the character in y that corresponds to that in z is copied to the result; otherwise, the character in x is copied directly to the result. If z contains duplicates, the leftmost occurrence is used. y is padded with blanks, or truncated, on the right to match the length of z. Any arithmetic or bit arguments are converted to character. TRANSLATE does not support GRAPHIC or WIDECHAR data. TRANSLATE will perform best when the second and third arguments are either literals, named constants declared with the VALUE attribute, or restricted expressions
public static java.lang.Object TYPE(java.lang.Object rhs)
rhs
- - handle of an object to be used as the value
Note: compiler generates inline assignment because Java obj are not immupublic static BitN UNSPEC(java.lang.Object X)
X
- - the PL/I variable to unspecpublic static java.lang.Object UNSPEC(Pointer<?> dest, java.lang.Object source)
dest
- - a Pointer to the original object to be assigned bits from the sourcesource
- - any object that is to be converted to bits and assignedpublic static java.lang.Integer DIMENSION(Array<?> x, java.lang.Integer y)
x
- - Array reference. x must not have less than y dimensions.y
- - Expression specifying a particular dimension of x. If necessary, y is converted
to a FIXED BINARY(31,0). y must be greater than or equal to 1. If y is not
supplied, it defaults to 1.
y can be omitted only if the array is one-dimensional.Condition
- SUBSCRIPTRANGE if the dimension number is out of range of the arraypublic static java.lang.Integer LBOUND(Array<?> x, java.lang.Integer y)
x
- - Array reference. x must not have less than y dimensions.y
- - Expression specifying a particular dimension of x. If necessary, y is converted
to FIXED BINARY(31,0). y must be greater than or equal to 1. If y is not
supplied, it defaults to 1.
y can be omitted only if the array is one-dimensional.Condition
- SUBSCRIPTRANGE if the dimension number is out of range of the arraypublic static java.lang.Integer HBOUND(Array<?> x, java.lang.Integer y)
x
- - Array reference. x must not have less than y dimensions.y
- - Expression specifying a particular dimension of x. If necessary, y is converted
to FIXED BINARY(31,0). y must be greater than or equal to 1. If y is not
supplied, it defaults to 1.
y can be omitted only if the array is one-dimensional.Condition
- SUBSCRIPTRANGE if the dimension number is out of range of the arraypublic static java.lang.Integer ALLOCATION(java.util.Stack<?> x)
x
- - Level-1 unsubscripted controlled variable.public static Pointer<?> ADDR(Pointer<?> ptr, java.lang.Object toModel)
ptr
- - a pointer to any object to use as the source of the overlaytoModel
- - a model of an object in which the object's class is used to return
a Pointer of that class. ex. ADDR(Pointerpublic static Pointer<?> ADDR(java.lang.Object ref, java.lang.Class<?> outerClass, java.lang.Object This)
ref
- - a reference to any objectouterClass
- - a reference to any objectpublic static java.lang.String PLIDUMP(java.lang.Object... argument)
argument
- - an (optional) argument on which to obtain a document
executable in the host operating systempublic static void PLIEXIT()
public static void PLIRETC(java.lang.Integer X)
X
- - the exit value to use when the main program exitspublic static java.lang.Integer PLIRETV()
public static java.lang.Object PRECISION(java.lang.Object X, int P, int Q)
X
- - expressionP
- - Restricted expression. p specifies the number of digits that the value of the
expression x is to have after conversion.Q
- - Restricted expression. It specifies the scaling factor of the result. For a
fixed-point result, if q is omitted, a scaling factor of zero is assumed. For a
floating-point result, q must be omitted.public static java.lang.Integer CURRENTSIZE(java.lang.Object x)
x
- - the variable type (Java class) to analyzepublic static java.lang.Integer SIZE(java.lang.Object x, int dclsize)
x
- - the allocated variable (Java object) to analyzedclsize
- - the declared size of the symbol
(not a defined parameter on the SIZE(x) builtin; added by the compiler)public static java.lang.Integer SYSTEM(java.lang.String cmd)
cmd
- - a String representing a command and argument string
executable in the host operating systempublic static void main(java.lang.String[] args)
public static void CALLCOBOL(java.lang.String pgmName, com.heirloomcomputing.ecs.exec.Context context, java.lang.Object... actualParameters)
pgmName
- - the String program name to invokecontext
- - an existing COBOL Context (due to -out:transaction) or null to create a new one to make this callactualParameters
- - Java parameters that are converted to equivalent COBOL Variable types prior to
invoking the pgmNamepublic static java.lang.Object CALLCOBOLGIVING(java.lang.String pgmName, com.heirloomcomputing.ecs.exec.Context context, java.lang.Class<?> returnType, java.lang.Object... actualParameters)
pgmName
- - the String program name to invokecontext
- - a Context for the calling program or null if no context is availablereturnType
- - the Class> of the expected return typeactualParameters
- - Java parameters that are converted to equivalent COBOL Variable types prior to
invoking the pgmName