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 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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

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