Execute dsjob -ljobs on before-job subroutine redirect to fi

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
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

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

Post 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.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post 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.
Accept that some days you're the pigeon and some days you're the statue.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Fully path the dsjob command.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

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

Post 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).
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post 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...
Accept that some days you're the pigeon and some days you're the statue.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

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

Post 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
Accept that some days you're the pigeon and some days you're the statue.
Post Reply