Hello,
<BAD DESIGN ALERT ON>
VB VSAM KSDS housing upwards of 10 million records on any given day; LRECL 2040, KeyLen 22, CISIZE 8192. The way records are written is every primary record going in will have another entry with a different key. For example if 'A' is the record to be written, then the dataset will have two records (in all) for 'A' as 996A and 997A - both with slight difference in the key.
Now what this does is, arranges all 996 records from top to midway of the dataset, followed by 997 records right to the end of file.
This works fine, until someone wants to read both 996 and 997 record for a particular key, or like in my case - read all the 997 records ONLY - I need to go through all the darn 5 million 996 records to hit the first 997 record.
</BAD DESIGN ALERT OFF>
Is there a way that a user can start reading an input KSDS dataset FROM a certain key onwards in *SORT? My current understanding says - this is not possible; please prove me wrong
And all that this SORT is doing is a FIELDS=COPY, Include on 997 records, with an OUTREC to build output with selected fields; hardly 4 or 5 of them.
Have modified it to replace the OUTREC with INREC - which in this case won't make much of a different since it is just a COPY; yet unless I somehow don't figure out a way to NOT READ the first half of this dataset, I really cannot think of anything else to make this quicker.
Please let me know if diagnostic messages are required, will post the latest runs data then.
Thank you.