Page 1 of 1

can i output to NULL from transformer ?

Posted: Wed Jan 27, 2010 1:25 am
by dennisroser
Hi

I have made a job that runs a stored procedure with the Stored Procedure Stage

The return value from this stored procedure is being put in the UserStatusArea of the job, for later reference in a sequence.

This is done in a transformer where i am calling a little routine writen in basic, that uses the DSSetUserStatus function to pass the return value to the UserStatusArea.

This is working fine

Problem is, a transformer needs an output link, so i gave it a text file to write something in.

i don't need that file for anything, so i am thinking if anybody has any good ideas of how to avoid this.

In a paralllel job i could just output to a peek stage but not in a server job.

Can i output to NULL from the transformer ?

any other ideas to avoid this extra file

Regards

Peter

Posted: Wed Jan 27, 2010 2:17 am
by ray.wurlod
Not directly, but you can use a Sequential File stage to append to the file .\NUL (which exists in every folder).

Tip: don't try to overwrite .\NUL - you have to append to it.

Posted: Wed Jan 27, 2010 2:31 am
by dennisroser
[quote="ray.wurlod"]Not directly, but you can use a Sequential File stage to append to the file .\NUL (which exists in every folder).

Tip: don't try to overwrite .\NUL - you have to append to it.[/quote]

a little mistake (but i bet significant) in my starting post. This is in aLinux environment, does this have a similar concept ?

regards

PEter

Posted: Wed Jan 27, 2010 2:41 am
by ray.wurlod
Yes, in any form of UNIX (including Linux) the file name is /dev/null. It remains the case that you must append to it, not overwrite it.

Posted: Wed Jan 27, 2010 3:38 am
by dennisroser
[quote="ray.wurlod"]Yes, in any form of UNIX (including Linux) the file name is /dev/null. It remains the case that you must append to it, not overwrite it.[/quote]

and that worked , thanks

Posted: Wed Jan 27, 2010 8:22 am
by chulett
Hmmm... I don't recall ever having to worry about overwrite v. append when outputting to /dev/null, always left it at the default of overwrite I do believe.