IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

copy file 2 data into file1 for matched records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
SUJEET06462

New User


Joined: 20 Sep 2016
Posts: 2
Location: India

PostPosted: Fri Jun 04, 2021 11:10 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1257
Location: Bamberg, Germany

PostPosted: Sat Jun 05, 2021 3:19 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2024
Location: USA

PostPosted: Sat Jun 05, 2021 1:57 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Sun Jun 06, 2021 10:15 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Jun 07, 2021 7:34 pm
Reply with quote

Duplicate. Locked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 2
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
Search our Forums:

Back to Top