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: 1337
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: 2141
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: 3076
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: 3076
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 Unable to interpret a hex value to De... COBOL Programming 7
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts db2 vs static data COBOL Programming 1
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts External data queue (changes?) CLIST & REXX 0
Search our Forums:

Back to Top