Page 1 of 1

Compiling through CLI

Posted: Wed Feb 10, 2010 4:54 am
by arthan
Please let me know whether compiling datastage8 jobs through CLI is possible. This is because, we are accessing datastage client through citrix server, which is slow rather. So, i want to directly compile it in a LINUX box through CLI. Is it possible

Re: Compiling through CLI

Posted: Wed Feb 10, 2010 6:18 am
by priyadarshikunal
arthan wrote:Please let me know whether compiling datastage8 jobs through CLI is possible. This is because, we are accessing datastage client through citrix server, which is slow rather. So, i want to directly compile it in a LINUX box through CLI. Is it possible

Search from dscc which is a command line utility to compile jobs.

Re: Compiling through CLI

Posted: Wed Feb 10, 2010 6:38 am
by arthan
priyadarshikunal wrote:
arthan wrote:Please let me know whether compiling datastage8 jobs through CLI is possible. This is because, we are accessing datastage client through citrix server, which is slow rather. So, i want to directly compile it in a LINUX box through CLI. Is it possible

Search from dscc which is a command line utility to compile jobs.
Hope this is possible only through client (installed in my windows). But i want the same to be performed from Linux command line where my DSEngine server is installed

Posted: Wed Feb 10, 2010 3:02 pm
by ray.wurlod
While it's not possible through a specific command line interface, it is possible to compile on the server (or "engine tier") using the same mechanism that DataStage itself uses.

I don't have the details available right now, but you need to invoke dssh in the project and execute (from memory) DSD.Compile.

I'll research the details and update this thread.

Posted: Sat Feb 13, 2010 3:32 pm
by ray.wurlod
OK, I've managed to track it down. Details follow.

Just stumbled on this - happened to catch one in a list of processes. Obviously the $DSHOME/dsenv script needs to have been executed first. You need to be attached to the project directory.

Code: Select all

$DSHOME/bin/uvsh "DSD.CompileJob jobname FULL"
Haven't played with it much yet. But you may have some spare cycles in which to experiment. It throws a "variable not defined" warning from DSD.GenRuntime when compiling parallel job, but it gets compiled OK nevertheless. It also outputs a six digit number such as 070707 - no idea what this is. Exit status ($? on UNIX, %ERRORLEVEL% on Windows) should be 0 if compile succeeds.

To compile a sequence, the environment variable TEMPFILE must be set, providing a file name (such as /tmp/CompileJob) that can be used to store intermediate XML - this file is created and deleted as part of the processing. Clearly write permission is needed to its parent directory (/tmp in my example).

I believe that all the messages from DSD.GenRuntime can be safely ignored, as "" (the default substituted string value) seems to work OK.

To generate an infinite supply of "any" key presses, redirect stdin from /dev/null (and old trick, but a goody).

Code: Select all

$DSHOME/bin/uvsh "DSD.CompileJob MyJobName  FULL" < /dev/null << EOF
> EOF
Maybe you can redirect stderr there also.

Code: Select all

$DSHOME/bin/uvsh "DSD.CompileJob MyJobName  FULL" < /dev/null 2>/dev/null << EOF
> EOF
This is not my code, and I don't propose supporting it.