Merge Process

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pramod_au
Participant
Posts: 30
Joined: Thu Feb 06, 2003 8:30 am
Location: London,UK

Merge Process

Post by pramod_au »

Hi all
I am using Datastage6.0 I have two files which has same structure.I need to merge these files(i.e Combine the contents of 2 files)
Regards

Pramod
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In what sense merge? If you mean simply combine all the rows from both files, the Merge stage is overkill; you'd define a full outer join or some such.
Far more efficient, assuming the files are called file1 and file2, would be to have a before-job subroutine called ExecSH (assuming UNIX) perform the command cat file1 file2 > file3 and then make file3 the input file for DataStage.
(If you're on Windows platform, the subroutine name is ExecDOS and the command is type file1 file2 > file3 but otherwise the logic is the same.)


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply