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
 

 

How to get only duplicates to file2 from the file1

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

New User


Joined: 15 Jun 2005
Posts: 5

PostPosted: Wed Jun 15, 2005 2:09 pm    Post subject: How to get only duplicates to file2 from the file1
Reply with quote

Hi, How to get only duplicates to file2 from the file1?
if we can do it by XSUM, can you give me the syntax?
Back to top
View user's profile Send private message

MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Wed Jun 15, 2005 2:35 pm    Post subject:
Reply with quote

Has your system installed DFSORT?
If it's true try with:
Code:
//*---------------------------------------------------
//*     ICETOOL UTILITY                               
//*---------------------------------------------------
//STEP010S EXEC PGM=ICETOOL                           
//TOOLMSG  DD SYSOUT=*                               
//DFSMSG   DD SYSOUT=*                               
//TOOLIN DD *                                         
   SELECT FROM(INDD) TO(OUTDD)  ON(1,8,CH) ALLDUPS   
//INDD     DD DISP=SHR,DSN=MYINPUT                   
//OUTDD    DD DISP=(,CATLG,DELETE),LRECL=80,RECFM=FB,
//            SPACE=(XXX,(XX,XX),RLSE),               
//            DSN=MYOUTPUT                           


where "ON(1,8,CH)" is the length(start,length,format) of the key that you want search.
If you need also the other record you can modify that step with:

Code:
...
   SELECT FROM(INDD) TO(OUTDD)  ON(1,8,CH) ALLDUPS    -
          DISCARD(OTHERDD)
//INDD     DD DISP=SHR,DSN=MYINPUT                   
//OUTDD    DD DISP=(,CATLG,DELETE),LRECL=XX,RECFM=XX,
//            SPACE=(XXX,(XX,XX),RLSE),               
//            DSN=MYOUTPUT                           
//OTHERDD DD DISP=(,CATLG,DELETE),LRECL=XX,RECFM=XX,
//            SPACE=(XXX,(XX,XX),RLSE),               
//            DSN=DISCARDD                           


p.s. = all the fields with xx depend of your need and remember that for VB input data start in position 5.
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Wed Jun 15, 2005 2:58 pm    Post subject: Re: Sort problem (get only duplicates in other file)
Reply with quote

Hi,
If you are using SYNCSORT, then try XSUM. For Syntax of XSUM see
http://ibmmainframes.com/viewtopic.php?t=966&highlight=xsum
Back to top
View user's profile Send private message
Revankumar

New User


Joined: 15 Jun 2005
Posts: 5

PostPosted: Wed Jun 15, 2005 7:47 pm    Post subject: Re: Sort problem (get only duplicates in other file)
Reply with quote

My system doesn't support the XSUM, I cheked that.
and with ICETOOL it is working fine.

Thanks to both of you for help.
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: Wed Jun 15, 2005 9:25 pm    Post subject:
Reply with quote

DFSORT does not support the XSUM parameter. However, DFSORT's ICETOOL provides the XSUM function and much more with the SELECT operator. See the following for details:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst01.html#t12
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts compare two files and replace record ... faizm DFSORT/ICETOOL 9 Tue Sep 02, 2014 7:16 pm
No new posts SORT CARD to remove duplicates & ... mkk157 DFSORT/ICETOOL 17 Tue Jul 08, 2014 9:04 pm
No new posts Write output from file1 if record fro... Agni DFSORT/ICETOOL 2 Sun Jun 08, 2014 9:19 pm


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