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
 

 

SUM FIELDS=NONE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SUM FIELDS=NONE
Reply with quote

Hi All,

I was referring post http://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: 1703
Location: Australia

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

Hi,

see link http://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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 15, 2009 4:52 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Oct 15, 2009 4:58 pm    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Thu Oct 15, 2009 5:01 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 15, 2009 5:05 pm    Post subject:
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Oct 15, 2009 9:15 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am


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