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

File comparison


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

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Wed Jun 04, 2014 3:28 am
Reply with quote

Hello,

I am looking for some help to achieve the following. I have two input files in the following format,

File 1 has two fields. Field 1 will be available from position 1-3 (3 characters long) and field 2 will be available from position 4-13 (10 characters long). This file is presorted in ascending order from position 1-13. For example,

AAAXXXXXXXXXX
AAAXXXXXXXXXU
AAAXXXXXXXXXZ
ABCXXXXXXXXXU
ACDXXXXXXXXXU
ACDXXXXXXXXXZ

File 2 with single field 10 characters long and sorted in ascending order. The set of values in File 2 will be a subset of values in field 2 of file 1.For example,
XXXXXXXXXX
XXXXXXXXXU

I would like to create an output from file 1 with field 2 values available in file 2. For example,
AAAXXXXXXXXXX
AAAXXXXXXXXXU
ABCXXXXXXXXXU
ACDXXXXXXXXXU

Any help would be appreciated.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jun 04, 2014 5:40 am
Reply with quote

Isn't this just a basic JOINKEYS operation?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jun 04, 2014 12:01 pm
Reply with quote

Yes, unless the number of records on the second file is relatively small, it is a simple JOINKEYS. Use SORTED,NOSEQCK on the second file, but the first will have to be sorted.

You only need matched records, so no JOIN statement. REFORMAT can be very simple, just F1:1,13. Since you are matching from the entire data on F2, then the data matched to on F1 is obviously already the same.
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