Page 1 of 1

Posted: Tue Sep 23, 2003 4:36 pm
by gpbarsky
Hi.

When I had this case, I had to build two server jobs: one for the first time, with the "overwrite data" check in the seq. stage checked.

The other job for the next times, had this check not checked, and instead of this I had the "append data" check checked.

I had to do this in this way cause of the CR and LF characters, that I did not know how the file was comming. Besides, The omit last line check was also disturbing me.

I hope that this help you. Good luck [:)].


Guillermo P. Barsky
Buenos Aires - Argentina

Posted: Tue Sep 23, 2003 4:51 pm
by ray.wurlod
I'd use a Sequential File stage and a before-stage subroutine from the Transformer stage it feeds data into.
The before-stage subroutine uses ExecSH to execute the UNIX command cat file1 file2 > file3, and the Sequential File stage reads file3.
If your DataStage server is on Windows, the before-stage subroutine is ExecDOS and the command is type file1 file2 > file3
If you are on version 6 or later of DataStage, you could invoke this command as a filter program within the Sequential File stage, avoiding the need to run a before-stage subroutine.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518

Posted: Wed Sep 24, 2003 2:44 am
by Optico
Ray's suggestion is OK, but you have to beware that the first file in the concatenation ends with a line termination character (in DOS/Windows CrLf). Otherwise you'll loose the first record of the second file and the last record of the first file will look very funny indeed.



B. Sorensen,
Optico IT ApS

Posted: Wed Sep 24, 2003 8:13 am
by Peytot
You can use the stage 'Link Collector' if you would like to visialise the action.

Peytot