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

Getting Non Match Keys from First File


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sreekusr
Warnings : 1

New User


Joined: 28 Aug 2006
Posts: 54
Location: Madrid

PostPosted: Tue Jun 07, 2011 8:30 pm
Reply with quote

Hi all,

Below is the requirement

File1
1
2
3
4
5

File2
2
4
5

O/p File (non-matching records from File1)
1
3

Could anyone help me on this.

Thanks,
sree
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Jun 07, 2011 9:52 pm
Reply with quote

sreekusr,

The following DFSORT JCL will give you the desired results
Code:

//STEP0100 EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                   
//INA      DD *                           
1                                         
2                                         
3                                         
4                                         
5                                         
//INB      DD *                           
2                                         
4                                         
5                                         
//SORTOUT  DD SYSOUT=*                   
//SYSIN    DD *                           
  JOINKEYS F1=INA,FIELDS=(1,1,A),SORTED         
  JOINKEYS F2=INB,FIELDS=(1,1,A),SORTED         
  JOIN UNPAIRED,F1,ONLY     
  OPTION COPY                             
//*


If the input files are not already in sorted order, remove ',SORTED'.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top