Emulating StartBR in *SORT



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Emulating StartBR in *SORT

Postby Aki88 » Sat Apr 29, 2017 7:50 pm

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 :cry:
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.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Emulating StartBR in *SORT

Postby BillyBoyo » Mon May 01, 2017 2:07 am

I think your best bet, since you just want the 997's, and that (it would seem) is the high-order part of the key, is IDCAMS REPRO. The key there will be actioned, and, since it is a VSAM data set, especially since it is a KSDS, REPRO will also be faster in just copying the records (REPRO can be more tightly-connected to how VSAM records can be acessed, SORT is at least a further "layer" away, likely - I've seen a couple of tests from different people in different set-ups, which point to this).

For resource-checking, just copy the entire data set with SORT and with REPRO. If REPRO is already faster (it will be) it'll be even faster when you add the key.

Of course, in other cases REPRO won't do,if you want reformatting capabilities. For those cases, you could compare a SORT Exit (can be written in COBOL) which presents records to SORT (Exit does the IO) where you do the START.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Emulating StartBR in *SORT

Postby Aki88 » Thu May 04, 2017 2:11 pm

Thank you Billy; I'll work on this, let me see if something works out.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post