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

How to get only duplicates to file2 from the file1


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
Reply with quote

Hi,
If you are using SYNCSORT, then try XSUM. For Syntax of XSUM see
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
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 Developer


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

PostPosted: Wed Jun 15, 2005 9:25 pm
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:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to remove block of duplicates DFSORT/ICETOOL 8
This topic is locked: you cannot edit posts or make replies. Compare files with duplicates in one ... DFSORT/ICETOOL 11
This topic is locked: you cannot edit posts or make replies. Trying to put date from File1 into fi... SYNCSORT 14
No new posts Merging 2 files but ignore duplicate... DFSORT/ICETOOL 1
This topic is locked: you cannot edit posts or make replies. copy file 2 data into file1 for match... DFSORT/ICETOOL 4
Search our Forums:

Back to Top