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
 

 

Matching the key position between 2 files.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Matching the key position between 2 files.
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 Moderator


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

PostPosted: Thu Feb 26, 2009 9:19 pm    Post subject:
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    Post subject:
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    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 Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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