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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top