IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Random selection of records in a file

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Other Mainframe Topics
View previous topic :: View next topic  
Author Message
kespra



Joined: 03 Jun 2008
Posts: 24
Location: bangalore

Posted: Tue Sep 02, 2008 6:55 pm    Post subject: Random selection of records in a file  

How to select records randomly in a file? For example if I have 10 records and I want only 2,5 8 whot should I do?
Back to top  
superk



Joined: 26 Apr 2004
Posts: 3304
Location: Charlotte,NC USA

Posted: Tue Sep 02, 2008 6:56 pm    Post subject: Reply to: Selection of records in a file?  

Using what tool/utility/software/language?
Back to top  
Robert Sample



Joined: 06 Jun 2008
Posts: 943
Location: Atlanta, GA

Posted: Tue Sep 02, 2008 6:58 pm    Post subject:  

If you really want to select records randomly you almost have to write a program that generates a random number, selects that record, and repeats the process until complete.
Back to top  
CICS Guy



Joined: 18 Jul 2007
Posts: 1199
Location: At my desk

Posted: Tue Sep 02, 2008 6:59 pm    Post subject:  

Robert Sample wrote: ...randomly ... :lol:
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Other Mainframe Topics
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM