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

Different behaviour of sort jcl


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Thu Nov 05, 2009 12:54 pm
Reply with quote

Hi,

I tried to sort a file of around 4000 records (LRECL=1800). The sort parameter is
Code:

SORT FIELDS=(1,80,CH,A)


In my input file for some records, the first 80 characters are same. So the expected output was for those records, it should remain the same sequence as it is present in the input fille. But it is sorting the records using the key fields beyond the 80th position. The output came in a different order for those records.

When i added two more sort work files, it is getting correctly populated.

I like to know why it is happening as such. Is it some thing related to size of sort work files.

Thanks in advance..
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 05, 2009 1:05 pm
Reply with quote

NO....
the sort manuals are clear about it,
when sorting the output order for records with the same sort key is unpredictable

check the sort manuals for the EQUALS option/parameter
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Nov 05, 2009 1:07 pm
Reply with quote

Probably not, I have seen the relative position of sort field records change from run to run.

To preserve the sequence .........
Code:

  SORT FIELDS=(1,80,CH,A),EQUALS
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Thu Nov 05, 2009 1:10 pm
Reply with quote

Thanks. Will using the EQUALS parameter affect the performance ?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 05, 2009 1:20 pm
Reply with quote

anything that does more processing will affect performance, don' t You think so?

but the requirements are requirements... aren' t they ?

anyway ... for 4000 records
the time You spend meditating about the performance issue
will cost to Your organization more than the cpu cycles needed icon_biggrin.gif
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Thu Nov 05, 2009 1:26 pm
Reply with quote

Ya. You are right. But just thought of looking is there any other alternatives available. Thanks enrico and expat.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 05, 2009 2:11 pm
Reply with quote

Quote:
But just thought of looking is there any other alternatives available


please explain why You were not satisfied with the answers we gave You...
it will help people who spend their time helping at no charge
to give better answers and raise the customer's satisfaction icon_evil.gif
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Thu Nov 05, 2009 2:41 pm
Reply with quote

Hi,

I didnt mean that i'm not satisfied. I value your response but the reason for asking me about the performance is that to find whether i can avoid any performance issue if any.
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Thu Nov 05, 2009 3:18 pm
Reply with quote

Hi Once some else were also having the same kind of problem at that time Arun sugested to add a seqnum to the end and then sort add that to the fields
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 05, 2009 3:33 pm
Reply with quote

Quote:
Hi Once some else were also having the same kind of problem at that time Arun sugested to add a seqnum to the end and then sort add that to the fields


wouldn' t sort provided facilities provide better performance ?

add a sequence number at INREC
sort on a longer key
reformat to strip the sequence number at OUTREC

Nahhhh! icon_biggrin.gif better let sort do it
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Thu Nov 05, 2009 3:35 pm
Reply with quote

Hi Enrico,
U r correct according to performance point.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Nov 05, 2009 11:33 pm
Reply with quote

S.Selvakumar,

The use of EQUALS will most likely not affect performance significantly, but the only way to know for sure is to run your specific job with and without EQUALS in effect and evaluate the performance based on your criteria. As for "alternatives" that would perform better, the answer is most likely there aren't any.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top