|
Rob, you hit the nail on the head! This is exactly what I could use. Thanks a lot! Best regards, Peter Colpaert Application Developer Massive - Kontich, Belgium ----- Yoda of Borg are we. Futile is resistance, assimilated will you be. ----- rob@xxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 10/03/2005 15:01 Please respond to RPG programming on the AS400 / iSeries To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc: Subject: Re: AW: Random number in VARPG Would you really need an SQL database? Many people use the 'dummy' file method when they don't need to. For example select current time into :myvar from sysibm/sysdummy1 When they could do values current time into :myvar http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/info/db2/rbafzmstvalinto.htm#valinto Granted, the example for RAND does use the dummy file method. However (and I would use your own multiplication factor!) this works: D myRandNum s 10i 0 C/exec sql C+ values (rand() * 1000) into :myRandNum C/end-exec /free *inlr=*on; return; /end-free Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com Peter.Colpaert@xxxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 03/10/2005 08:34 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: AW: Random number in VARPG Hi Brigitta, I guess it is possible, but that brings me to a different problem, namely that I'd need an SQL database of some sort on his PC. But I'll keep your suggestion in mind. Thanks, Peter Colpaert Application Developer Massive - Kontich, Belgium ----- Yoda of Borg are we. Futile is resistance, assimilated will you be. -----
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.