dsjob Command with "-wait" option

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Apy
Participant
Posts: 18
Joined: Fri Oct 14, 2016 6:26 am

dsjob Command with "-wait" option

Post by Apy »

I am calling dsjob command with"-wait" option from a shell script but it seems, the dsjob command just triggers the job and does not wait for the Job to finish.
Below is the Syntax I am using within the shell -

Code: Select all

DSCMD=/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob

$DSCMD -run -wait -param <Parameters> <ProjectName> <Jobname>
Script triggers the Job and leaves a warning message for the -wait option.
Below is message from the Shell output -

Code: Select all

./ScriptName.ksh: line 52: Waiting: command not found
line 52 is the line number where this dsjob command is written.

Additional Info - I have checked in $DSHOME/bin path using the command dsjob -h and it doesn't show -wait option there but when I try this by writting an incomplete command like dsjob -run, it shows the dsjob syntax which includes -wait option.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Code: Select all

$DSCMD -run -mode NORMAL -wait -param <Parameters> <ProjectName> <Jobname>
-craig

"You can never have too many knives" -- Logan Nine Fingers
Apy
Participant
Posts: 18
Joined: Fri Oct 14, 2016 6:26 am

Post by Apy »

I have already tried this option. It returns with same warning message.
Also, -mode NORMAL is optional to write, if we don't write -mode then dsjob will run in NORMAL mode as a default behavior.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, always good to fully specify what you want and see if it changes the behavior. It would seem you have found a bug, in your shoes I would contact your official support provider.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I would guess your script has a typo. Can you post the whole script?
Choose a job you love, and you will never have to work a day in your life. - Confucius
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

I guess that the script is not sourcing the dsenv file properly or the dsjob command is not fully qualified.

Test if the command runs fine from $DSHOME/bin after sourcing the dsenv file...If it works then check that part of on your script

We issue the command with same syntax in our shell script and it works like a charm... We only pass MODE if the DS job must be reset
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
Apy
Participant
Posts: 18
Joined: Fri Oct 14, 2016 6:26 am

Post by Apy »

qt_ky wrote:I would guess your script has a typo. Can you post the whole script?
So,the guess is correct...Below is the script I was using-
DSCMD=/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob

Code: Select all

If [[<expression>]];
then
`$DSCMD -run -wait -param <Parameters> <ProjectName> <Jobname>`
fi
I just removed "`" from the command and it goes well without any issue with -wait. But still confused, why only -wait was not working? :?

Even the above code was working in earlier AIX version with "`".
Post Reply