MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting first occurence of the record using SYNCSORT.
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
krkcs
Beginner


Joined: 30 May 2004
Posts: 27
Topics: 5

PostPosted: Tue Oct 11, 2005 5:16 am    Post subject: Reply with quote

Perfect Phantom....Thanks a Lot...!!!
_________________
-kr
Back to top
View user's profile Send private message
krkcs
Beginner


Joined: 30 May 2004
Posts: 27
Topics: 5

PostPosted: Fri Oct 14, 2005 12:46 am    Post subject: Reply with quote

Phantom,

What if, If I need only first occurences of the "REF" or "STD" ?? Now we will get only the first occurences of "REF", but requirement is changed now. sorry for this.
I need only first occurence of "REF" or "STD".

Input:
Code:

----+----1----+----2
AABHYSTDPERE
BAMQHSTDPERE
BAMQHREFOPER
BAMQHREFUPER
BAMQHSTDPERE
BBCBKREFUPER
BBCBKREFUPEF
BBCBKSTDUPEF
BBCBZREFFERE
BBCBZREFR342


Output:
Code:

----+----1----+----2
AABHYSTDPERE
BAMQHSTDPERE
BBCBKREFUPER

_________________
-kr
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Oct 14, 2005 1:08 am    Post subject: Reply with quote

krkcs,

Kolusu has already given the answer for this... This requirement is very simple, Just use SUM FIELDS=NONE !!!. Look at 10th post from Bottom (by Kolusu).

Thanks,
Phantom
Back to top
View user's profile Send private message
krkcs
Beginner


Joined: 30 May 2004
Posts: 27
Topics: 5

PostPosted: Fri Oct 14, 2005 1:21 am    Post subject: Reply with quote

Phantom,
Will sum fields=none get the first occurences alone ?? I have tried but found for some of the records are the second, third and other occurences also....Thanks !
_________________
-kr
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Oct 14, 2005 1:38 am    Post subject: Reply with quote

Krkcs,

Quote:

have tried but found for some of the records are the second, third and other occurences also....Thanks !


I didn't get you....SORT FIELDS & SUM FIELDS=NONE will get you One occurrence of every key. Are you saying that for some key instead of the first occurrence, you see second / third record. If that is the case, you must use OPTION EQUALS.

One Humble Request. When you try some code and say that it is not working, please post the JCL you used so that we can see if you had missed any statements by mistake / modified something without realising that, that would cause a problem.

Thanks,
Phantom
Back to top
View user's profile Send private message
krkcs
Beginner


Joined: 30 May 2004
Posts: 27
Topics: 5

PostPosted: Fri Oct 14, 2005 1:43 am    Post subject: Reply with quote

You got me right Phantom..and it's working as I needed....

Going forward will follow your suggestion of posting the JCL also...Thanks for your suggestion...

Thanks !
_________________
-kr
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group