MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FileA - FileB (With all the duplicates of FileA)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
computer
Beginner


Joined: 12 Jun 2007
Posts: 64
Topics: 17
Location: Hyderabad

PostPosted: Thu Sep 16, 2010 3:21 pm    Post subject: FileA - FileB (With all the duplicates of FileA) Reply with quote

I have 2 files as mentioned below:

FileA
-----
F1R1
F1R2
F1R2
F1R3
F1R3
F1R4

FileB
-----
F1R3
F1R4

Output(FileA-FileB)
---------------------
F1R1
F1R2
F1R2

Thanks In Advance,
Computer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Sep 16, 2010 4:01 pm    Post subject: Reply with quote

computer,

Use the following DFSORT JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                   
//INA      DD *                         
F1R1                                     
F1R2                                     
F1R2                                     
F1R3                                     
F1R3                                     
F1R4                                     
//INB      DD *                         
F1R3                                     
F1R4                                     
//SORTOUT  DD SYSOUT=*                   
//SYSIN    DD *                         
  OPTION COPY                           
  JOINKEYS F1=INA,FIELDS=(1,4,A)         
  JOINKEYS F2=INB,FIELDS=(1,4,A)         
  JOIN UNPAIRED,F1,ONLY                 
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group