Page 1 of 1

Can we call UniX Scripts in Jobs(Not in Sequence)

Posted: Thu Sep 11, 2008 12:40 am
by laknar
Hi,

Can we call UniX Scripts in Jobs? i.e Transformer Stage

if IsNull(A) then SetNull()

Instead of the above condition can we use

NullToValue(A,NULL).

Please suggest me.

Posted: Thu Sep 11, 2008 1:29 am
by ray.wurlod
NullToValue is not a UNIX script.

Can you be more precise about your requirement? In particular do you wish to invoke the UNIX command once per run or once per row?

Posted: Thu Sep 11, 2008 2:52 am
by laknar
Hi Ray,

two doubts one is regarding Null Handling.
Another is UNIX Script in Jobs both in row level and One time execution.
Please suggest me.

Posted: Thu Sep 11, 2008 3:22 am
by ray.wurlod
You ought to ask the question - a specific question please - about NULL handling in a different thread. We stick to "one thread, one question" to make it easier on future searchers.

Executing a UNIX script one time is done from a before-job or after-job subroutine, typically ExecSH or one of its derivatives (or you can write your own). The Input Arguments field takes the entire script command line; it can use job parameters, which will be resolved before the call is made.

Executing a UNIX script once for each line is not to be recommended because of the overhead of establishing and relinquishing a shell in which that script would run. It would be very, very slow.
However, if you insist, this is what the Wrapped stage is for. For more information find the relevant chapter in the DataStage Parallel Job Advanced Developer's Guide manual.

Posted: Thu Sep 11, 2008 7:29 am
by OddJob
You can also use the following stages as source, transform or target:

Source: External Source
Transform: External Filter
Target: External Target