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: 7251

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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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