× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Mon, Jul 3, 2017 at 11:30 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:
Random generating a 16-digit number: An easy task in Rexx. Or so I
thought. I can not figure out how to return that value to the calling
program. QREXQ seemed the right way but I can not make it happen.

QREXQ (to retrieve values from Rexx's external data queue) is probably
the closest thing to a "right" way. I'm sure it can be made to work.

But there are other options to pass data out of Rexx and into the
"outside world". Chief among them is probably writing the data to a
file. If the data you wish to pass from Rexx to the caller can be
represented by a single digit, you could also use a return code which
shows up in the text of a CPF7CFF message.

See
<https://www.itjungle.com/2008/06/11/fhg061108-story02/>
<https://www.itjungle.com/2005/10/05/fhg100505-story01/>

Or is there another way to generate a random number?

Two of the other ways already mentioned in this thread are quite common:

CEERAN0:
<http://www.rpgpgm.com/2013/10/generating-random-numbers-part-i.html>
RAND (SQL function):
<http://www.rpgpgm.com/2013/10/generating-random-numbers-part-ii.html>

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.