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

Giving different results for same input file - SYNCSORT


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 37
Location: Chennai

PostPosted: Tue Feb 26, 2013 3:56 am
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: 1788
Location: Bloomington, IL

PostPosted: Tue Feb 26, 2013 4:11 am
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Feb 26, 2013 4:49 am
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
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: 37
Location: Chennai

PostPosted: Wed Feb 27, 2013 9:09 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top