View previous topic :: View next topic
|
Author |
Message |
janusman
New User
Joined: 09 Sep 2008 Posts: 31 Location: India
|
|
|
|
Hi
My shop has SYNCSORT 1.4
It would be great if someone can can clarify my understanding on how sort works.
In order for a JOINKEYS sort to work properly, the files should be sorted based on the keys am matching with.
e.g.
Code: |
JOINKEYS FILE=F1,FIELDS(10,10,A)
JOINKEYS FILE=F2,FIELDS(01,10,A) |
If I have File1 already sorted in (10,10,ch,a) - then it is better to specify "SORTED" keyword - Right?
If I do not have the file1 sorted by the matching key- and If I use the above code snippet - will the sort card take care of internally sorting it by itself? or - I still need to have the File1 sorted before this step? |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Code: |
If I have File1 already sorted in (10,10,ch,a) - then it is better to specify "SORTED" keyword - Right?
|
What does syncsort documentation say about SORTED clause? |
|
Back to top |
|
|
janusman
New User
Joined: 09 Sep 2008 Posts: 31 Location: India
|
|
|
|
I do not have the syncsort documentation with me now.
but - If I remember correctly, if the files are already sorted based on the keys, it is better to give "SORTED" keyword.
I tried a few simple tests with unsorted files and giving JOINKEYS similar to above - and it returns the result as expected but in sorted order given in JOINKEYS sort card.
So - I would safely assume my understanding is correct - but - just wanted to clarify. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Quote: |
SORTED Parameter (Optional)
By default, SyncSort will presume that the records in the file are not presequenced per the JOINKEYS FIELDS specified. If the records are already collated in the proper sequence (sorted as binary fields, with the first field being the major field and the subsequent fields being progressively less significant fields), the SORTED parameter can be specified to improve the application's performance.
SyncSort will sequence check each input file according to its JOINKEYS fields. If the SORTED parameter of the JOINKEYS statement was specified to indicate that the file was presorted and the sequence check fails, SyncSort will issue a critical error message containing the file number.
The record number within the file will also be in the error message text whenever the INCLUDE/OMIT parameter of the JOINKEYS statement was
not specified.
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I do not have the syncsort documentation with me now. |
Then you need to get it. . .
If your organization is licensed to use the product, all of the material is available free from Syncsort Support. |
|
Back to top |
|
|
janusman
New User
Joined: 09 Sep 2008 Posts: 31 Location: India
|
|
|
|
Thanks Superk for the clarification.
Dick - I am working on getting that. Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
To me, trying to use a product without documentation is kinda like a mechanic who is missing tools
d |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I requested a copy of my Syncsort documentation in the first week of this new position at a new company, and had it within about 48 hours. |
|
Back to top |
|
|
|