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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Matching with Key at different postions. rajatbagga DFSORT/ICETOOL 12 Wed Nov 09, 2016 10:58 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


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