Page 1 of 1

Re: Execute dsjob -ljobs on before-job subroutine redirect t

Posted: Thu Mar 11, 2010 1:30 pm
by asorrell
dsedi wrote: we already have the Path set to "..DSEngine/bin" directory on the current user .profile file.
if you've correctly set the path, then you should be able to type "dsjob" and see it print the command syntax. Are you sure you exported the PATH correctly? Syntax should have been something like:

Code: Select all

$ export PATH=$PATH:/opt/IBM/InformationServer/Server/DSEngine/bin
Try typing "Env" as the before job ExecSh and see if it has the correct path.

Posted: Thu Mar 11, 2010 1:45 pm
by dsedi
Andy,

What ever we have tried/posted above is from Datastage Desginer,
Not from command prompt.

the

Code: Select all

dsjob -ljobs DEV_PROJ >/home/dpuser/Job_Report.txt
command works like a charm on the UNIX command prompt from any where including the user home directory which means the .profile setting for "..DSEngine/bin" is correct

We are trying to execute the dsjob command in the job properties before-job subroutine ExecSh.

Thanks for helping us.

Posted: Thu Mar 11, 2010 2:17 pm
by chulett
Fully path the dsjob command.

Re: Execute dsjob -ljobs on before-job subroutine redirect t

Posted: Thu Mar 11, 2010 2:26 pm
by asorrell
Ok - Just ran a test on my system and I had to put the full path into it for it to work (from the log):

Code: Select all

DummyJob..BeforeJob (ExecSH): Executed command: 
/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -domain machine:9080 -user dsadm -password removed -server machine.company.com -lprojects
*** Output from command was: ***

Status code = 0 
ANALYZERPROJECT
Dev_Project1
Dev_Project2
You can see the command I used (sort of - had to change sensitive bits).

Posted: Thu Mar 11, 2010 2:51 pm
by dsedi
chulett wrote:Fully path the dsjob command. ...
Thank you Craig.It worked.
we should have tried that before posting! we'll be more careful next time :D
thanks for stopping by...

Re: Execute dsjob -ljobs on before-job subroutine redirect t

Posted: Thu Mar 11, 2010 2:56 pm
by dsedi
asorrell wrote:Ok - Just ran a test on my system and I had to put the full path into it for it to work (from the log):

Code: Select all

DummyJob..BeforeJob (ExecSH): Executed command: 
/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -domain machine:9080 -user dsadm -password removed -server machine.company.com -lprojects
*** Output from command was: ***

Status code = 0 
ANALYZERPROJECT
Dev_Project1
Dev_Project2
You can see the command I used (sort of - had to change sensitive bits).
Thanks for your test Andy...
We just need to Job names only...so in ExecSh we put

Code: Select all

/px/admin/Ascential/DataStage/DSEngine/bin/dsjob -ljobs DEV_PROJ >/home/dpuser/Job_Report.txt 
and it's creating the file with Job names...

Thanks for your help. :D