RANDOMNUMBER

LANSA Composer

RANDOMNUMBER

This activity generates a pseudo-random number in the range specified by the LOWERBOUND and UPPERBOUND input parameters.  For example, if the default values of 1 (one) and 100 (one hundred) are used for the LOWERBOUND and UPPERBOUND parameters, the resulting pseudo-random number will be in the range 1 to 100 inclusive.

Typically (but not invariably), each use of the RANDOMNUMBER activity will yield a result different to the previous and frequent use will yield results that will be evenly spread, on average, over the range specified by the LOWERBOUND and UPPERBOUND input parameters.

Technical note:  The implementation of the RANDOMNUMBER activity uses the LANSA RANDOM_NUM_GENERATOR built-in function with a stream index value of 77.  Refer to LANSA documentation for more information on this built-in function.

INPUT Parameters:

LOWERBOUND : Optional

This optional parameter specifies the lower bound of the range of the resulting pseudo-random number.  If not specified, a default value of 1 (one) is used.

UPPERBOUND : Optional

This optional parameter specifies the upper bound of the range of the resulting pseudo-random number.  If not specified, a default value of 100 (one hundred) is used.

OUTPUT Parameters:

NUMBEROUT :

Upon completion, this parameter contains the generated pseudo-random number in the range specified by the LOWERBOUND and UPPERBOUND input parameters.