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

SUM FIELDS=NONE


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Thu Oct 15, 2009 4:32 pm
Reply with quote

Hi All,

I was referring post www.ibmmainframes.com/post-553.html to see when I do not say an 'EQAUALS' option, will I get a last dup by using a SUM FIELDS=NONE.

The information I have got is it can be either last or first dup if EQUALS is not specificied. Is there anyway I can ensure LAST dup is taken all the time? If not, any reason behind this?

Thanks,
Prajesh V Parambath
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 15, 2009 4:40 pm
Reply with quote

Hi,

see link ibmmainframes.com/viewtopic.php?t=43762&highlight=last


Gerry
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Thu Oct 15, 2009 4:46 pm
Reply with quote

Hi Gcicchet,

I cannot use a SYNCTOOL or ICETOOL here. Is there any solution using SUM FIELDS=NONE itself to get last dup?

Thanks,
Prajesh V P
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Oct 15, 2009 4:52 pm
Reply with quote

Quote:
I cannot use a SYNCTOOL or ICETOOL here

Is there any valid reason for this statement.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Oct 15, 2009 4:58 pm
Reply with quote

Hi,

you can add a sequence number, then sort the records with the sequence in descending order, now you will have a file with the last duplicate first, now you can use SUM FIELDS=NONE.

Don't forget to use the equals option.


Gerry
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Oct 15, 2009 5:01 pm
Reply with quote

deleted by poster - duplicate response to previous post.
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Thu Oct 15, 2009 5:02 pm
Reply with quote

Expat,

We do have a restriction on SYNCTOOL as they say it s less efficient and less maintainable. I am not 100% sure if this is true, but still I have to be using simple sort.

Thanks,
Prajesh
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Oct 15, 2009 5:05 pm
Reply with quote

Oh well, there is always some fool that makes these restrictions on those trying to get the work done.

They probably do not realise that ICETOOL is actually a part of DFSORT, and I assume the same for SYNCTOOL and SYNCSORT.
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 Oct 15, 2009 9:15 pm
Reply with quote

Quote:
The information I have got is it can be either last or first dup if EQUALS is not specificied. Is there anyway I can ensure LAST dup is taken all the time?


The information you got is wrong. With EQUALS, the first dup is kept. Without EQUALS, any record from the set of duplicates can be kept. There's no guarantee it will be the first or last record. The appropriate way to get the LAST duplicate is to use the ICETOOL SELECT operator with LASTDUP or LAST depending on what you want for output.

DFSORT's ICETOOL is just as efficient as DFSORT. DFSORT's ICETOOL is just as maintainable as DFSORT since complete documentation for both DFSORT and DFSORT's ICETOOL are available online. DFSORT's ICETOOL has been shipped with DFSORT since 1991!

As far as I know, there is no documentation for Syncsort's SYNCTOOL so maybe that's why somebody said it's "less maintainable" then SYNCSORT. But I'm just guessing.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts Converting unpacked fields to pack us... SYNCSORT 4
No new posts Data for newly added fields not displ... IMS DB/DC 6
This topic is locked: you cannot edit posts or make replies. SUM FIELDS=NONE in reverse - Get dupl... DFSORT/ICETOOL 9
Search our Forums:

Back to Top