Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Giving different results for same input file - SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 36
Location: Chennai

PostPosted: Tue Feb 26, 2013 3:56 am    Post subject: Giving different results for same input file - SYNCSORT
Reply with quote

Hello,

I have been getting some extreme results when a file is sorted to remove duplicates using SYNCSORT. (SYNCSORT FOR Z/OS). When I run the same input file, I'm getting different results for each run. Can you please provide your thoughts on this? The volume of data in the input file is about 3 to 4 million records.

Input - FB
First 4 bytes is binary value and key value (For representation purpose, displayed the actual value)

Input
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
1001JAMES                M            COWINS          90001A    CA03245
2001JAMES                M            COWINS          40002B    AL12345
3001DAVID                             ROBERT          98462C    MN34567
4001REED                 N            TAYLOR          79426D    AK30042
4001REED                 N            TAYLOR          25984E    LA20032
1001JAMES                M            COWINS          60008A    CA03245
1001JAMES                M            COWINS          20003B    CA03245
4001REED                              TAYLOR          18460C    AB12345
2001JAMES                M            COWINS          10001A    AL12345
2001JAMES                M            COWINS          20001B    AL12345


SORT1 - First remove duplicates based on key & Name
Code:

SORT FIELDS=(1,4,BI,A,5,50,CH,A)
SUM FIELDS=NONE                 


SORT2 - Take the output from SORT1 and remove duplicates based on same Name and state id.
Code:

SORT FIELDS=(5,50,CH,A,65,7,CH,A)
SUM FIELDS=NONE       


Output on First run:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
1001JAMES                M            COWINS          90001A    CA03245
3001DAVID                             ROBERT          98462C    MN34567
4001REED                 N            TAYLOR          79426D    AK30042
2001JAMES                M            COWINS          10001A    AL12345


Output on Second run:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+
3001DAVID                             ROBERT          98462C    MN34567
4001REED                 N            TAYLOR          79426D    AK30042
2001JAMES                M            COWINS          10001A    AL12345


There are many records that are eliminated even though they are not duplicates based on the key. Please advise.
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1754
Location: Bloomington, IL

PostPosted: Tue Feb 26, 2013 4:11 am    Post subject:
Reply with quote

The output data you allege to be getting on your first run is not that expected from your control cards nor does it match the output I get when I run a job with these data and control cards. Please justify your statements.
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Tue Feb 26, 2013 4:20 am    Post subject:
Reply with quote

Different results with exact same input, environment, and JCL? I never heard of that.

Is the BI length of 4 or should it be 2?

Just guessing since you only show 1-extreme result. Hard to compare.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Feb 26, 2013 4:49 am    Post subject: Reply to: Giving different results for same input file - SYN
Reply with quote

Can you post the full sysout and JCL from both steps?

If the "key" is always associated with a State, why not do one Sort with the three key fields?

If not always associated, then you will/can get different results if you are not using OPTION EQUALS.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Feb 26, 2013 9:27 pm    Post subject:
Reply with quote

Looks like you changed from variable to fixed in SORT1, so your sort fields are now 5 bytes off. Actually, it looks like they might be wrong in SORT1.
Back to top
View user's profile Send private message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 36
Location: Chennai

PostPosted: Wed Feb 27, 2013 9:09 am    Post subject: Reply to: Giving different results for same input file - SYN
Reply with quote

Thanks everyone for your time in reviewing my request and posting your comments.

With "OPTION EQUALS" I'm able to get desired results.

Thanks Bill Woodger!!!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us