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
 

 

File comparison

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: File comparison
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

Moderator Team Head


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

PostPosted: Wed Jun 04, 2014 5:40 am    Post subject: Reply to: File comparison
Reply with quote

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Wed Jun 04, 2014 12:01 pm    Post subject: Reply to: File comparison
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    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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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