On Fri, 26 Apr 2019 17:01:04 -0700, Sri h Kolusu wrote: > >Aren't you limited to just 100,000 records ? The number of days between >0001-01-01 and 9999-12-31 is 3,652,058. How does above REXX generate >beyond 100,000? > No, you can generate a number of records limited only by the Rexx range on numeric values, and that can be extended with NUMERIC DIGITS.
>If your run your exec as with the following > >TSO GENYDATA 100001 1753 9999 > >Results in > > 14 +++ say date( 'Standard', First + random( 0, Span ), 'Base' ) > IRX0040I Error running GENYDATA, line 14: Incorrect call to routine > True. I should have stated as a restriction that my scheme is limted to a span of 273 years. And Rexx's not supporting the Julian calendar. >Lets say you have managed to get a random number between 1 and 3,652,058 by >tweaking the formula for random number, how are you planning to avoid >duplicates? > The OP didn't specify whether he wanted "sampling with replacement" or "sampling without replacement". My scheme corresponds to sampling with replacement, which realistically models a sampling of birthdays of randomly selected individuals; duplicates are possible. I haven't a good example of dates sampled without replacement; I don't doubt there are some. Thanks, gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
