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: 2286
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 5
No new posts INPFIL FILES, FNAMES examples SYNCSORT 7
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
Search our Forums:


Back to Top