View previous topic :: View next topic
|
Author |
Message |
SUJEET06462
New User
Joined: 20 Sep 2016 Posts: 2 Location: India
|
|
|
|
i have 2 files, 1st file lrecl : 1000, total records 100000. unique key: 1 to 20
2nd file: LRECL : 40, Total records 100, unique key 1 to 20
i want to merge file 2 to file1 in such a way that for matching records in file 1 and file 2 :
1) 21 : 40 data from file 2 should be copied to 61 :80 in file 1
2) all unmatched records in file 1 should remain unchanged.
output file should contain all records of file 1 |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1337 Location: Bamberg, Germany
|
|
|
|
Provide sample data for F1 and F2 and what you have tried so far. Make use of the code button (that works as a toggle) when providing code or data.
Remember that this is a help forum and not "do my job for me". |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
SUJEET06462 wrote: |
i have 2 files, 1st file lrecl : 1000, total records 100000. unique key: 1 to 20
2nd file: LRECL : 40, Total records 100, unique key 1 to 20
i want to merge file 2 to file1 in such a way that for matching records in file 1 and file 2 :
1) 21 : 40 data from file 2 should be copied to 61 :80 in file 1
2) all unmatched records in file 1 should remain unchanged.
output file should contain all records of file 1 |
Is this a narrative: “Short Story from a Software Developer’s Life”? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
SUJEET06462 wrote: |
i have 2 files, 1st file lrecl : 1000, total records 100000. unique key: 1 to 20
2nd file: LRECL : 40, Total records 100, unique key 1 to 20
i want to merge file 2 to file1 in such a way that for matching records in file 1 and file 2 :
1) 21 : 40 data from file 2 should be copied to 61 :80 in file 1
2) all unmatched records in file 1 should remain unchanged.
output file should contain all records of file 1 |
Welcome!
Read JOINKEYS under DFSORT manual. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Duplicate. Locked. |
|
Back to top |
|
|
|