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

Merging 2 files but ignore duplicates from 2nd file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SUJEET06462

New User


Joined: 20 Sep 2016
Posts: 2
Location: India

PostPosted: Sun Jun 06, 2021 1:51 am
Reply with quote

Quote:

I HAVE 2 FILES BOTH HAVING SAME LRECL OF 14
BOTH THE FILES ARE NOT IN SORTED ORDER FOR ITS KEY.
KEY IS 1: 5 FOR BOTH FILES
I WANT TO MERGE BOTH THE FILES INTO OUTPUT DATA SET.
IF THERE IS ANY DUPLICATE BETWEEN FILE1 AND FILE2, RECORD IN FILE1 ONLY SHOULD BE COPIED TO OUTPUT FILE.
FILE 1 : SALARY OF EPMPLOYEE IN JUNE
EMP01 HR 20000
EMP02 IT 40000
EMP03 SS 25000
EMP04 HR 45000

FILE2: SALARY OF EMPLOYEE IN MAY
EMP04 HR 40000
EMP05 IT 12000
EMP06 KK 15000

OUTPUT FILE : AFTER MERGING AND REMOVING DULPICATES FROM FILE2:
EMP01 HR 20000
EMP02 IT 40000
EMP03 SS 25000
EMP04 HR 45000
EMP05 IT 12000
EMP06 KK 15000

[/code]

SORT FIELDS = (1,5,CH,A)
SUM FILEDS = NONE
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2144
Location: USA

PostPosted: Sun Jun 06, 2021 2:27 am
Reply with quote

0) Learn how to use properly the code tags.

1) Learn how to use properly UPPERCASE, lower case, and Mixed Case in ANY of your messages and/or codes. Same about bold, and italic.

2) Learn the difference between MERGE operations, and JOIN operations.

3) Next, you are ready to start questioning about code development.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic 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 3 files concatenated to 1 DFSORT/ICETOOL 2
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
Search our Forums:

Back to Top