RPGspRandom Function
Generates and returns a string of random digits.
Syntax
RPGspRandom(number of digits)
Part | Description |
number of digits | Optional. Numeric value specifying the length of the generated string. If omitted, 16 digits are returned. |
Remarks
This function can be useful for assigning random id's. It can also be used to pass random data to a URL to prevent caching.
A call to RPGspRandom will return something like '8563690071399766'.
RPGspRandom(3) will return something like '162'.
Example
Here is a snippet of HTML that uses RPGspRandom to prevent caching of the page:
<A href="dsp_opn.pgm?Rnd=<% RPGspRandom %>"> Display Open Orders </A> |
Another way to accomplish this is to use RPGspSetHeader('Cache-Control: no-cache').
See
Also
Profound
Logic Software, Inc.
www.ProfoundLogic.com
(937) 439-7925