IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort Keyword: SORTED


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Mon Oct 24, 2011 9:27 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Oct 24, 2011 9:37 pm
Reply with quote

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
View user's profile Send private message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Mon Oct 24, 2011 9:47 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Oct 24, 2011 9:56 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 24, 2011 10:06 pm
Reply with quote

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
View user's profile Send private message
janusman

New User


Joined: 09 Sep 2008
Posts: 31
Location: India

PostPosted: Mon Oct 24, 2011 10:09 pm
Reply with quote

Thanks Superk for the clarification.

Dick - I am working on getting that. Thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 24, 2011 10:32 pm
Reply with quote

You're welcome - good luck icon_smile.gif

To me, trying to use a product without documentation is kinda like a mechanic who is missing tools icon_wink.gif

d
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Oct 25, 2011 12:46 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top