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
 

 

match and unmatch records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: match and unmatch records
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    Post subject: Reply to: match and unmatch records
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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