View previous topic :: View next topic
|
Author |
Message |
SUJEET06462
New User
Joined: 20 Sep 2016 Posts: 2 Location: India
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2144 Location: USA
|
|
|
|
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 |
|
|
|