Compiling through CLI

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
arthan
Participant
Posts: 3
Joined: Wed Feb 10, 2010 3:21 am

Compiling through CLI

Post 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
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Re: Compiling through CLI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
arthan
Participant
Posts: 3
Joined: Wed Feb 10, 2010 3:21 am

Re: Compiling through CLI

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply