View previous topic :: View next topic |
Author |
Message |
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Fri Apr 24, 2015 10:59 pm Post subject: SORTWK & Buffers Unavailable for Syncsort Join keys |
|
|
Hi I've 2 files and first file is having around 10 million records unique records. The length of the keys starts from 1 to 23 bytes. And the second file contains 340 million records and first 23 bytes contains key values but they contain duplicates. I want to read the record from the first file and match the records from the second file and write all the matched records from the second file.
I've used syncsort using joinkeys but the job is abending due to buffers unavailable. I've increased sort work areas and used SDB=LARGE. Still I'm getting abend. Please suggest an alternate approach. Thank you |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Sat Apr 25, 2015 1:52 am Post subject: |
|
|
Why are you using SORTWK datasets? You don't have a 340-million-record file with a 23-byte key and it is not in order?
If the data is in order, specify SORTED on the JOINKEYS statement for that file.
If for some unusual reason your data is not in order, post the sysout from the failing step. |
|
Back to top |
|
|
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Sat Apr 25, 2015 10:52 pm Post subject: |
|
|
Both the files are in same sorted order. I will post the abend details. Thank you |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Sun Apr 26, 2015 3:18 am Post subject: |
|
|
Code: | JOINKEYS F1=zzz,FIELDS=(yy,xx,A),SORTED |
If the data is in sequence, then you should not allow JOINKEYS to SORT it, then the whole question of sort-work space becomes irrelevant. Specify both your JOINKEYS with the SORTED, as in this example. |
|
Back to top |
|
|
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Tue Apr 28, 2015 10:55 am Post subject: |
|
|
Hi the problem is solved. I've increased VOL=(,,,6) to VOL=(,,,26) and mentioned SORTED for second file and the job executed successfully. Thank you for all your help |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Tue Apr 28, 2015 12:03 pm Post subject: |
|
|
Since you said both files were in sequence already, you're still wasting a lot by not specifying SORTED for both the JOINKEYS files. |
|
Back to top |
|
|
|
|