Re: Reducing I/O amount
Posted: Thu Nov 10, 2011 8:29 am
Just a thought. You can take advantage of the sorts fast I/O by using sort exits. I did this once long ago when I was sorting large datasets and wanted to minimize passes through the data. In your case, you could use a sort exit to count the records in input. As you can fail the record (i.e. tell sort not to sort/merge it) with a return code. Sort will get the next record for you. I believe you are given indication that you have end of input file(s) and you could print your record count. Not sure if this is just an exercise or if it something you need to do on a regular basis, which is the only reason to use a sort exit.