View previous topic :: View next topic
|
Author |
Message |
Christy
New User
Joined: 17 Nov 2010 Posts: 14 Location: India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|