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
 

 

Compare 2 files of differnt LRECL and diffrnt no. of records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Christy

New User


Joined: 17 Nov 2010
Posts: 14
Location: India

PostPosted: Wed Jan 12, 2011 6:08 pm    Post subject: Compare 2 files of differnt LRECL and diffrnt no. of records
Reply with quote

Hi,

I have 2 input files, File A and File B.
File A has 20 records and LRECL=25
File B has 10000 records and LRECL=100.

Both files should be compared. File A has 8 fields in the order
A B C D E F G H

File B has 20 Fields in the order
K L M A J T I B V U S C P G Q H I Y D N F X W.

I want to compare File A's A B C D E F G H with File B's A B C D E F G H.
And in the output file i need A B C D E F G H X W ,that is the last two fields of File B included with all the fields of File A.


For example:


Code:


File A

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
NAME      PLACE     AGE  DOJ            EXP  GENDER
MARY      USA       22   10/11/2010     3       F
SAM       UK        34   07/08/2000     9       M


File B

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
NAME      PLACE     EXP  DOB            DEPT      STATUS
MARY      USA       3    11/11/1985     COMM      MARRIED
JANE      IND       1    21/05/1989     SCI       SINGLE
SAM       UK        9    17/09/1976     IT        MARRIED
 

Output File

 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
 NAME      PLACE     AGE  DOJ            EXP  GENDER    STATUS
 MARY      USA       22   10/11/2010     3       F      MARRIED
 SAM       UK        34   07/08/2000     9       M      MARRIED



All the fields of File A is Present in File B but it is scattered.
And in output file i only need File A fields which match with File B And that with ONLY the fields in File A and The last 2 fields of file B of the corressponding records.

There can be duplicates in File B.
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 Jan 13, 2011 12:43 am    Post subject:
Reply with quote

I can't tell from your description and example which fields are where in the two files. You don't even list field E for file B.

With this level of information, about all I can tell you is that you can probably do what you want with DFSORT's JOINKEYS function. For complete information on JOINKEYS, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174

For more examples, see the "Create files with matching and non-matching records" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
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 member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts WER247A incompatible lrecl Danielle.Filteau SYNCSORT 8 Tue May 02, 2017 4:04 am


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