View previous topic :: View next topic
|
Author |
Message |
Krishnadeva Reddy
New User
Joined: 14 Nov 2007 Posts: 37 Location: Chennai
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
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 |
|
|
Krishnadeva Reddy
New User
Joined: 14 Nov 2007 Posts: 37 Location: Chennai
|
|
|
|
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 |
|
|
|