|
On Mon, 6 Aug 2001, Debbie Panco wrote: > > Has anyone used or come across a random number generator > on the AS400? Did you write one in-house? Is there any type > of standard/accepted calculation for one? Just fishing for ideas > or thoughts here. > I know of two random number generators that come with the operating system. 1) The CEERAN0 API, which can be found here: http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/apis/CEERAN0.htmA (That should be one line... if it gets split, you may need to paste it back together) 2) The rand() and srand() functions from the C runtime library. (You can call them from other ILE languages, even if you don't own the ILE C compiler) They are documented here: http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/BOOKS/qb3at500/1.2.125 Additionally, when I was bored one night, I wrote my own. I can't say that I use it very often, but it seems to work :) Which one is best will probably depend on which language you're looking to call these functions from. (You didn't say!) I could even post examples, if it's a language that I'm familar with... +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.