MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sort script generates different output files on Val and Prd

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
shrabanti
Beginner


Joined: 01 Jun 2006
Posts: 2
Topics: 1

PostPosted: Thu Jun 01, 2006 4:29 pm    Post subject: sort script generates different output files on Val and Prd Reply with quote

I have a sort routine that I run on the same input file in Validation Unix and Production Unix , and the output files are generated differently.

Anyone has any ideas on this ?

thanks
STB
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Fri Jun 02, 2006 7:58 am    Post subject: Reply with quote

shrabanti,

Just a wild guess do you have OPTION EQUALS on both sort cards? Can you post your sort control cards?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shrabanti
Beginner


Joined: 01 Jun 2006
Posts: 2
Topics: 1

PostPosted: Fri Jun 02, 2006 9:55 am    Post subject: Reply with quote

syncsort \
/infile $1.dat 201 \
/recordlayout key1 char 26, \
type char 1, \
key2 char 61, \
filler 5, \
key3 char 45, \
hcbType char 4, \
sellTeam char 6, \
hcp_id char 8, \
hcp_cid char 10, \
hcb_id char 8, \
hcb_p_cid char 10, \
hcb_cid char 11, \
month_dt char 6 \
/keys key1,key2,key3,type, hcbType, sellTeam, hcb_cid desc \
/summarize \
/outfile $2.dat overwrite \
/STATISTICS \
/end
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Fri Jun 02, 2006 10:09 am    Post subject: Reply with quote

Quote:

/summarize \


shrabanti,

Since you are using SUM function Option EQUALS plays an important role.



Code:
                                                                           
EQUALS guarantees that the first of a series of equal-keyed records is either first-in (SORT) or from the lowest numbered SORTINnn data set (MERGE). With NOEQUALS, there is a random element to the order in which records with identical control fields will appear in the output. With or without EQUALS, MERGE preserves the order of equal-keyed records within any one data set.                                                               
                                                                           
When used in conjunction with SUM, EQUALS indicates which of the equal-keyed records will be preserved, containing the sum: the record occurring first in SORTIN (for a sort), or drawn from the SORTINnn data set with the lowest nn number (for a merge) will contain the totaled fields.                       


Having said that I have no idea as to how you specify the OPTION EQUALS parm in unix environment.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group