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

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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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