|
I know that there's been a big discussion about this before... but I
have an issue that I couldn't find in the archives.
If I run this statement interactively (in STRSQL). I get a
different value everytime...
select dec((rand()* 10000000000),10,0) from sysibm/sysdummy1
But when I put it in the SQLRPGLE program (which so happens to be a
DEV2 web program), I get the same value.
select dec((rand()* 10000000000),10,0) into :RandomNumber from
sysibm/sysdummy1
RandomNumber always equals 5138706625
If I put a number in the Rand Function, Rand(somenumber). I get a
different value then above but it doesn't change on repeated calls.
The activation group is *NEW and the Rand function is non-
deterministic. So I don't follow why I'm getting the same value.
I've even tried doing Values(...) into :RandomNumber;
Michael Schutte
Admin Professional
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.