IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Random number generation


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shakti

New User


Joined: 20 Jan 2004
Posts: 42

PostPosted: Tue Jun 14, 2005 6:19 pm
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
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Wed Jun 15, 2005 9:51 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
Search our Forums:

Back to Top