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

Random selection of records in a file


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

New User


Joined: 03 Jun 2008
Posts: 24
Location: bangalore

PostPosted: Tue Sep 02, 2008 6:55 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Sep 02, 2008 6:56 pm
Reply with quote

Using what tool/utility/software/language?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 02, 2008 6:58 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 02, 2008 6:59 pm
Reply with quote

Robert Sample wrote:
...randomly ...
icon_lol.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 6
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts DB2 Query to get the count of Unique ... DB2 2
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
Search our Forums:


Back to Top