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

match and unmatch records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saikiran valisetty

New User


Joined: 29 Mar 2010
Posts: 1
Location: chennai

PostPosted: Thu Apr 08, 2010 1:00 am
Reply with quote

i am having file1 and file2 with length 604 of variable block
key starts from 2nd position of length 20.
i want matching records in one file and unmatch records of file 1 in another file.both files are having duplicates and i want duplicates in the output file
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Apr 08, 2010 1:23 am
Reply with quote

With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), DFSORT now supports the JOINKEYS function which will give you the desired results as shown below


Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTJNF1 DD DSN=your input VB 604 file 1,DISP=SHR     
//SORTJNF2 DD DSN=your input VB 604 file 2,DISP=SHR
//MATCH    DD SYSOUT=*                                           
//NOMATCH  DD SYSOUT=*                                           
//SYSIN    DD *                                                 
  JOINKEYS FILES=F1,FIELDS=(6,20,A)                             
  JOINKEYS FILES=F2,FIELDS=(6,20,A)                             
  REFORMAT FIELDS=(F1:1,4,?,F1:5)                               
  JOIN UNPAIRED,F1                                               
  SORT FIELDS=COPY                                               
  OUTFIL FNAMES=MATCH,INCLUDE=(5,1,CH,EQ,C'B'),BUILD=(1,4,6)     
  OUTFIL FNAMES=NOMATCH,SAVE,BUILD=(1,4,6)                       
//*
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
No new posts Filter records where condition is in ... SYNCSORT 6
Search our Forums:


Back to Top