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
 

 

Can I use sort to select sample records from a input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Steve Ironmonger

New User


Joined: 19 Oct 2015
Posts: 15
Location: UK

PostPosted: Tue Nov 10, 2015 10:02 pm    Post subject: Can I use sort to select sample records from a input file
Reply with quote

Hi, first post, so please be gentle.

I've been working on some data mining and i'm stuck on one last issue.

Basically I'm creating a file with 3+ million records in it and I want to create a file with just a sample of those 3 million records. I've written a simple REXX to do this but as it's a REXX it's not that quick....i.e. it takes 15/20 mins to run and will use +50% of the cpu if the mainframe is quiet...

My rexx reads in 10000 records at a time, adds 1 to a counter and then each time the counter // 30 it then writes out the record to an array/stack

I then end up with a file 1/30th the size of the original and the records sampled from across the whole file

Can i do this in sort ?

I have had a look through the dfsort manuals and asked the Oracle (google) but it's like looking for a needle in a haystack !

thanks

Steve
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Nov 10, 2015 10:15 pm    Post subject: Reply to: Can I use sort to select sample records from a input file
Reply with quote

You used the word "sample". If you look in the index, or search within the documentation for SAMPLE, you'll find it on OUTFIL, then you just need to arrange what you want.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 371
Location: USA

PostPosted: Tue Nov 10, 2015 10:45 pm    Post subject: Reply to: Can I use sort to select sample records from a input file
Reply with quote

Quote:
I have had a look through the dfsort manuals

If you have a look at the manual again, you'll find this (and more)

Quote:
* PROCESS RECORDS 1, 6, 11, ...
OUTFIL FNAMES=OUT1,SAMPLE=5
Back to top
View user's profile Send private message
Steve Ironmonger

New User


Joined: 19 Oct 2015
Posts: 15
Location: UK

PostPosted: Wed Nov 11, 2015 3:08 pm    Post subject: Reply to: Can I use sort to select sample records from a input file
Reply with quote

Thanks guys, thats perfect....

It's knowing what to search for that's key to working these things out, maybe I need to simplify my searches !
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am


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