|
|
| Author |
Message |
nickyboy
New User
Joined: 26 Aug 2005 Posts: 18
|
|
|
|
Hi all..
Is there any Random function in CLIST..
My requirement is that, by giving the length of the numeric field..I should get a random numeric value of that length...
Thanks..
Nick |
|
| Back to top |
|
 |
References
|
|
 |
dietocode
New User
Joined: 14 Nov 2005 Posts: 2 Location: Bangalore-India
|
|
|
|
Hi nicky,
Yes there is a RANDOM function. Please look at the details below.
RANDOM(max,min, max ,seed)
returns a quasi-random nonnegative whole number in the range min to max
inclusive. If you specify max or min or both, max minus min cannot exceed 100000.
The min and max default to 0 and 999, respectively. To start a repeatable sequence
of results, use a specific seed as the third argument, as described in Note 1. This
seed must be a positive whole number ranging from 0 to 999999999.
Here are some examples:
RANDOM() -> 305
RANDOM(5,8) -> 7
RANDOM(2) -> 0 /* 0 to 2 */
RANDOM(,,1983) -> 123 /* reproducible */ |
|
| Back to top |
|
 |
nickyboy
New User
Joined: 26 Aug 2005 Posts: 18
|
|
|
|
Hi dietocode,
Thanks for the reply..
I think the function you mentioned are for REXX only..
I am looking for something silmilar in CLIST.
Thanks,
Nick. |
|
| Back to top |
|
 |
|
|