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

Eliminate the duplicates in sort card


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

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Tue Sep 27, 2011 1:50 pm
Reply with quote

Hi frens,
I want the sort card for the following..

in a file name file1 there are records of length x(9). i need to eliminate the duplicates and write them into file 2 and write the only duplicate records of file2 into file3.

could any one help me in this regard.
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 Sep 27, 2011 2:04 pm
Reply with quote

Not so much a Cobol question as a Sort question?

Which sort product do you use?

Can you be a little clearer about what you want (if you want a useful answer)?

You have a file with duplicates, key is 9 characters - what position does it start from, or can we assume 1?

You want non-duplicates to one output file, duplicates to another output file. Can we assume that you want one representative of the duplicates on the first output file? If so, does it matter if first, last, any?

What are RECFM/LRECL for your files?

What have you tried yourself so far? "Duplicates" are a common theme if you do some searching of DFSORT/JCL fora.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Sep 27, 2011 2:05 pm
Reply with quote

Quote:
I want the sort card for the following..


we are a help forum not a do it for me
for bad mannered people who do not even know how to ask properly
and after three years You should know better

what did You do do to help yourself while waiting lazily for somebody to the job You are getting paid for ? icon_evil.gif

if You had cared to search the forums You would have found quite a few matching topics

the topic stays here for now, later ,might be moved appropriate forum or locked or deleted

the TS attitude ( as seen from other posts from the same ) does not deserve spending time on Him
Back to top
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Tue Sep 27, 2011 2:46 pm
Reply with quote

file1:
550235954
550235954
550235954
550235955
550235955
550235956

the above is the records in my file. using sort i want to filter the records as such all the non-duplicates into file 2 and all the duplicates into file3.
output:
file2:
550235954
550235955
550235956
file3:
550235954(2 times repeated so 2 times need to be written into file2)
550235954
550235955(1 time repeated so 1 time need to be written into file2)
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Sep 27, 2011 2:59 pm
Reply with quote

and what do You expect from us,
show that You have done some research..
as I said before forum searching will return quite a few topics with the same issue and the relative solution

before replying I searched and checked, no reason why You would not do the same

syncsort duplicate matching nonmatching are the buzzwords,
other buzzwords for syncsort are xsum noxsum
Back to top
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Tue Sep 27, 2011 3:02 pm
Reply with quote

hi all,

i have tries with

sort fileds=(1,09,CH,A)
SUM FILEDS=NONE

But this doesn't fulfill the above requirement right???

so asked ...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Sep 27, 2011 3:04 pm
Reply with quote

did You care to search with the last suggestion..
and what is the reason for not looking at the manuals ? icon_evil.gif

and ...
if You' d care to ask in a better way You might receive less unpleasant comments


to make the most out of the questions You ask and to forecast the comments You might receive
it would be wise for You to read and meditate on
how to ask questions the smart way
here catb.org/~esr/faqs/smart-questions.html
or .. for a more PC language
here support.microsoft.com/kb/555375
_________________
Back to top
View user's profile Send private message
hemu88

New User


Joined: 13 May 2011
Posts: 29
Location: India

PostPosted: Tue Sep 27, 2011 5:26 pm
Reply with quote

pls use this sort.

Code:

//STEP010 EXEC PGM=SORT                             
//SYSOUT   DD SYSOUT=*                                   
//SYSPRINT DD SYSOUT=*                                   
//SORTIN   DD DSN=TEST.XSUM.INPUT,DISP=SHR       
//SORTOUT  DD DSN=TEST.XSUM.OUTPUT,DISP=SHR     
//SORTXSUM DD DSN=TEST.XSUM.OUTPUT.XSUM,DISP=SHR
//SYSIN    DD *                                         
  SORT FIELDS=(2,10,CH,A)                               
  SUM FIELDS=NONE,XSUM
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Sep 27, 2011 6:15 pm
Reply with quote

once again the lazy and do nothing won icon_evil.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 27, 2011 6:33 pm
Reply with quote

nor really, look at the offset and lenth in the sort card
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 Sep 27, 2011 6:38 pm
Reply with quote

dbz, don't be so optimistic :-)

With his luck, his field always has at least one leading zero/space/some other fixed value and the field afterwards always has at least two. So, what the heck, it works, whack it in production!
Back to top
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Tue Sep 27, 2011 9:25 pm
Reply with quote

HI enrico-sorichetti,

mind you language and control your tongue....
Back to top
View user's profile Send private message
ram_vizag

Active User


Joined: 21 Aug 2008
Posts: 112
Location: hyd

PostPosted: Tue Sep 27, 2011 9:28 pm
Reply with quote

hi hemu88,

i already had done that...its working good...anyway thanks...


enrico-sorichetti,

i think people like you should be throw from this forum...not people like us...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Sep 27, 2011 9:33 pm
Reply with quote

deleted
no reason to waste time keeping on the discussion
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 Sep 27, 2011 10:10 pm
Reply with quote

ram_vizag wrote:
hi hemu88,

i already had done that...its working good...anyway thanks...

[...]


ram, I don't believe you. enrico gave you pointers to the solution at 9:29 this morning. Six-and-a-half hours later, and after someone else has given you some pretty specific code, you claim to have done it yourself with not a word of thanks to enrico? In fact, far from thanks. I don't believe you did the code, and I can't believe your attitude.

If you think such a tactic is clever for getting solutions here, see who else agrees with you.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Tue Sep 27, 2011 10:30 pm
Reply with quote

Thank Bill, just don' t bother,
the TS already made up his mind about him being the victim and me the bad guy icon_biggrin.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Sep 27, 2011 10:56 pm
Reply with quote

Hello,

Quote:
i think people like you should be throw from this forum...not people like us...
The good news is that almost no one cares what you think. . .

Something i'm sure you are not conscious of is that Enrico provides more specific help to people each and every day than you probably will in the next few years - if not your entire career.

We do need people like Enrico. People like you - not so much.

Oh, yeah - this topic is locked. . .
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 Help with SORT - I need to validate d... DFSORT/ICETOOL 7
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Is this possible via sort (in one pass)? SYNCSORT 4
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
Search our Forums:

Back to Top