Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us