| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
nickyboy
Joined: 26 Aug 2005
Posts: 18
|
| Posted: Thu Nov 10, 2005 5:45 pm Post subject: Is there any Random function in CLIST |
|
|
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 |
|
dietocode
Joined: 14 Nov 2005
Posts: 2
Location: Bangalore-India
|
| Posted: Mon Nov 14, 2005 9:29 am Post subject: Random function. |
|
|
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
Joined: 26 Aug 2005
Posts: 18
|
| Posted: Mon Nov 14, 2005 11:55 am Post subject: Re: Is there any Random function in CLIST |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|