Back in the days of RPG2 on the S/36 we used to use the seconds as a basis for a (kind of) random number. I found a link on google for this :-
<a href=”http://www-1.ibm.com/support/docview.wss?uid=nas1f23d225573c211a186256a240067a3da”>Generating Random Numbers in ILE RPG</a>
Hope this helps.
There is no information in the official guide because no ‘random’ function exists for RPG/400 or RPG II. You will need to write a program to create a ‘random’ number. You might call a REXX procedure to use its RANDOM function.
If you use RPG IV, though, (or almost any ILE language including ILE CL), you could simply call the C rand() API.