Can anyone please help me out to merge two datasets horizontally using DFSORT as shown below.
For Example,
Data-1:
ID Name
001 Ashok
002 Bharath
002 Sami
003 Anand
ID: 1 to 3
Name : 5 to 15
Data-2:
DOB ID
07MAR1984 001
02JAN1982 002
04APR1981 002
17NOV1985 003
DOB : 1 to 9
ID : 11 to 13
The output is,
Data-3:
ID Name DOB
001 Ashok 07MAR1984
002 Bharath 02JAN1982
002 Sami 04APR1981
003 Anand 17NOV1985
ID: 1 to 3
Name : 5 to 15
DOB : 17 to 25
Data-1:
ID Name
001 Ashok
002 Bharath
002 Sami
003 Anand
ID: 1 to 3
Name : 5 to 15
Data-2:
DOB ID
07MAR1984 001
02JAN1982 002
04APR1981 002
17NOV1985 003
DOB : 1 to 9
ID : 11 to 13
The output is,
Data-3:
ID Name DOB
001 Ashok 07MAR1984
002 Bharath 02JAN1982
002 Sami 04APR1981
003 Anand 17NOV1985
ID: 1 to 3
Name : 5 to 15
DOB : 17 to 25
Is there a DFSORT to achieve this output.
Note:-
1) File1, File2 will not contain any duplicates.
2) File1 is FB, LRECL = 15, Key = 1 - 3
3) File2 is FB, LRECL = 13, Key = 11 - 13
Thanks in Advance..
Regards,
Vignesh.