Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Random number generation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics
Author Message
shakti

New User


Joined: 20 Jan 2004
Posts: 35

PostPosted: Tue Jun 14, 2005 6:19 pm    Post subject: Random number generation
Reply with quote

Hi,

I am going to use the following query for generating the randon number for program A.

SELECT DECIMAL (RAND() * 999999999999 ,12,0)
DECIMAL (RAND() * 999999999999 ,12,0)
INTO :HV-1
:HV-2
FROM SYSIBM.SYSDUMMY1
WITH UR

Question:
If the same query used by program B (In parallel with A). Is there any chance of duplicate random number generated by A and B if they run parallel.

Thanks in advance
Back to top
View user's profile Send private message
References
PostPosted: Tue Jun 14, 2005 6:19 pm    Post subject: Re: Random number generation Reply with quote

priya

Moderator


Joined: 24 Jul 2003
Posts: 630
Location: Bangalore

PostPosted: Wed Jun 15, 2005 9:51 pm    Post subject:
Reply with quote

Quote:
Is there any chance of duplicate random number generated by A and B if they run parallel.


Yes, I hope. But the probability is very low.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1