Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Generation of random number in a cobol program.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
kranti

New User


Joined: 10 Oct 2005
Posts: 27

PostPosted: Thu Oct 20, 2005 12:36 pm    Post subject: Generation of random number in a cobol program.
Reply with quote

Hi Guys,

I have a small query in the generation of randon number in a cobol program.Requirement is like I have to produce a reference number which is like

01 Ws-Ref-nbr.

03 ws-field1 pic 9(03).
03 ws-field2 pic 9(03).
03 ws-field3 pic 9(10).
03 ws-field4 pic 9(02).
03 ws-field5 pic 9(05).

like this i have some reference number. This number i want to have randomly for output records which is of sequential file.In This WS-FIELD2
I am using the todays date which is coming from the input file in my program. All others are constant values and the last one WS-FIELD5 is of ascending order.So I am getting all the reference numbers which are satisfying the criteria.

Here the problem I am facing is, this program will run once in a day.
In some cases this may run more than once as per the neccesity.So when we run this program first time we are getting the refernce numbers perfectly.But when we run the second time also we are getting the same reference numbers.Here I want to have the reference number randomly means should not have the same refernce number even when we run the program more than once in a day.Is there anu possibility to know some random value which will change some time to time or else which meets the above criteria???

Could you anybody please provide the solution

Thanks In advance,
Kran
Back to top
View user's profile Send private message

priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Wed Nov 02, 2005 2:51 am    Post subject:
Reply with quote

Try http://ibmmainframes.com/programs.php
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us