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

Matching the key position between 2 files.


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

New User


Joined: 24 Feb 2009
Posts: 14
Location: chennai

PostPosted: Thu Feb 26, 2009 11:58 am
Reply with quote

Input File 1:
Code:

//IN1 DD *                             
AAAXYXYXYXYXYXY XYXYXYXY SSSSSSSSSS   
BBBYZYZYZYZYZYZ YZYZYZYZ PPPPPPPPPP   
CCCFGFGFGFGFGFG BCDABCDP PPPPPPPPPP   
DDDRTRTRTRTRTRT BCDABCDS SSSSSSSSSS   
/*                                     

Input File 2:
Code:

//IN2 DD *       
AAAXYXYXYXYXYXY 
BBBYZYZYZYZYZYZ 
CCCFGFGFGFGFGFG 

Output File 1:
Code:
                       
AAAXYXYXYXYXYXY XYXYXYXY SSSSSSSSSS
BBBYZYZYZYZYZYZ YZYZYZYZ PPPPPPPPPP


First It should match (1,15,CH) key position from file1 and file2.
Second the file-1 (17,8,CH) and file-2 (4,8,CH) should get matched
--- if both gets matched , it should written to Output File -1 -------
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Feb 26, 2009 9:19 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD *
AAAXYXYXYXYXYXY XYXYXYXY SSSSSSSSSS
BBBYZYZYZYZYZYZ YZYZYZYZ PPPPPPPPPP
CCCFGFGFGFGFGFG BCDABCDP PPPPPPPPPP
DDDRTRTRTRTRTRT BCDABCDS SSSSSSSSSS
/*
//IN2 DD *
AAAXYXYXYXYXYXY XYXYXYXY SSSSSSSSSS
BBBYZYZYZYZYZYZ YZYZYZYZ PPPPPPPPPP
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(T1)
COPY FROM(IN2) TO(T1) USING(CTL1)
SELECT FROM(T1) TO(OUT) ON(1,15,CH) ON(17,8,CH) FIRSTDUP
/*
//CTL1CNTL DD *
  INREC BUILD=(1,15,17:4,8,80:X)
/*
Back to top
View user's profile Send private message
vpalanivelu

New User


Joined: 24 Feb 2009
Posts: 14
Location: chennai

PostPosted: Fri Feb 27, 2009 5:08 pm
Reply with quote

Thnz millonzz Frank icon_smile.gif
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 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top