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
 

 

Eliminate the duplicates in sort card

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ram_vizag

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Tue Sep 27, 2011 1:50 pm    Post subject: Eliminate the duplicates in sort card
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 27, 2011 2:04 pm    Post subject: Reply to: sort card...
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Sep 27, 2011 2:05 pm    Post subject: Reply to: sort card...
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

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Tue Sep 27, 2011 2:46 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Sep 27, 2011 2:59 pm    Post subject: Reply to: sort card...
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

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Tue Sep 27, 2011 3:02 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Sep 27, 2011 3:04 pm    Post subject: Reply to: sort card...
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 http://catb.org/~esr/faqs/smart-questions.html
or .. for a more PC language
here http://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    Post subject: Reply to: sort card...
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Sep 27, 2011 6:15 pm    Post subject: Reply to: sort card...
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 27, 2011 6:38 pm    Post subject: Reply to: sort card...
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

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Tue Sep 27, 2011 9:25 pm    Post subject:
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

New User


Joined: 21 Aug 2008
Posts: 92
Location: hyd

PostPosted: Tue Sep 27, 2011 9:28 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Sep 27, 2011 9:33 pm    Post subject: Reply to: sort card...
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Sep 27, 2011 10:10 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Sep 27, 2011 10:30 pm    Post subject: Reply to: sort card...
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

Site Director


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

PostPosted: Tue Sep 27, 2011 10:56 pm    Post subject:
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    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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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