dsjob - wait command
Moderators: chulett, rschirm, roy
dsjob - wait command
Hi Everybody,
I have question.. can anybody help regarding my problem.
we have main script called first.ksh
first.ksh
[...
...
....
$DSHOME/bin/dsjob -run -wait -param inputFile=${STRIPPED_FILE} -jobstatus ogip sortNMR
ksh second.ksh output.txt
....
]
dsjob will create one file.. which will be used by second.ksh....
my question here is... if i dont use -wait option, second.ksh would be kicked off immediately after dsjob command... will it run sequencially or parallel?
-wait option would be applicable for another dsjob? will it give effect for subsequent script also?
Thanks in advance...
Basir
I have question.. can anybody help regarding my problem.
we have main script called first.ksh
first.ksh
[...
...
....
$DSHOME/bin/dsjob -run -wait -param inputFile=${STRIPPED_FILE} -jobstatus ogip sortNMR
ksh second.ksh output.txt
....
]
dsjob will create one file.. which will be used by second.ksh....
my question here is... if i dont use -wait option, second.ksh would be kicked off immediately after dsjob command... will it run sequencially or parallel?
-wait option would be applicable for another dsjob? will it give effect for subsequent script also?
Thanks in advance...
Basir
V'TH LUV
Yes, using wait will make it wait for the job to return it's status prior to continuing in your script, so these would run 'sequentially', as in end-to-end, meaning your job would run and then second.ksh would be called after that had ended in any state.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
I still have doubt, mostly because I have no idea what you are saying here. The "-wait" option is only applicable to the invocation of "dsjob" that it is used with. It makes the dsjob command wait for the job to complete before moving on to the next step, whatever that is - the next line in a script or going back to the command line for a manual launch.albasir wrote:I thought... dsjob -wait option would be applicable for another dsjob command not for script.
So its doesnt matter.. whether you are callling DSjob or script
Thanks for clearing my doubt...
What do you mean by "would be applicable for another dsjob command not for script" above?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Thanks for your reply....
i have script.... which follows
first.ksh
[
...
...
echo $DSHOME/bin/dsjob -run -param inputFile=${STRIPPED_FILE} -jobstatus ogip sortNMR > $SCRIPT/runCommandNMR
`chmod 770 $SCRIPT/runCommandNMR`
$SCRIPT/runCommandNMR
echo "Procesing the script now"
ksh $SCRIPT/splitNMR.ksh ${STRIPPED_FILE}meta ${STRIPPED_FILE}FAC #Start processing step.
echo "processing completed"
...
]
here first i am calling datastage job(without - wait option) and its give the output file.
and then am calling script(splitNMR) with output of previous step.
Log says:
---------
/opt/IBM/Ascential/DataStage/DSEngine/bin/dsjob -run -param inputFile=NMR_UI_US_ALL_ALL_WKY.20070224.0001U.00. -jobstatus ogip sortNMR
Waiting for job...
Finished waiting for job
Job Status : (3)
Status code = 3
Procesing the script now
My Analysis:
----------
Since i didn't give - wait option here... datastage job and script should have processed simultaneously/parallel... if you see here... script/echo command didnt execute after dsjob command.. its waiting to finish dsjob and then executing script/echo.
Wait option will be applicable only if we are calling two dsjob command one after another and want to execute sequentially. if we dont use - wait option in dsjob commands.. two jobs will start automatically.. This is my guess...
Can you please let me know my observation is correct or not?
i have script.... which follows
first.ksh
[
...
...
echo $DSHOME/bin/dsjob -run -param inputFile=${STRIPPED_FILE} -jobstatus ogip sortNMR > $SCRIPT/runCommandNMR
`chmod 770 $SCRIPT/runCommandNMR`
$SCRIPT/runCommandNMR
echo "Procesing the script now"
ksh $SCRIPT/splitNMR.ksh ${STRIPPED_FILE}meta ${STRIPPED_FILE}FAC #Start processing step.
echo "processing completed"
...
]
here first i am calling datastage job(without - wait option) and its give the output file.
and then am calling script(splitNMR) with output of previous step.
Log says:
---------
/opt/IBM/Ascential/DataStage/DSEngine/bin/dsjob -run -param inputFile=NMR_UI_US_ALL_ALL_WKY.20070224.0001U.00. -jobstatus ogip sortNMR
Waiting for job...
Finished waiting for job
Job Status : (3)
Status code = 3
Procesing the script now
My Analysis:
----------
Since i didn't give - wait option here... datastage job and script should have processed simultaneously/parallel... if you see here... script/echo command didnt execute after dsjob command.. its waiting to finish dsjob and then executing script/echo.
Wait option will be applicable only if we are calling two dsjob command one after another and want to execute sequentially. if we dont use - wait option in dsjob commands.. two jobs will start automatically.. This is my guess...
Can you please let me know my observation is correct or not?
V'TH LUV
Thanks for the information...
Now I got it...
Actually.. i have included both "- wait" as well as "- jobstatus". but it was given broken pipe error. so i decided to remove "- wait" option.
I have got
Error 81002 waiting for job
Broken pipe..
without - wait or jobstatus.. will it overcome the issue? or do we need to increast time out parameter.. i was searching for forum.. and my criteria didnt meet what am looking for...
Any help would be much appreciated...
-Basir
Now I got it...
Actually.. i have included both "- wait" as well as "- jobstatus". but it was given broken pipe error. so i decided to remove "- wait" option.
I have got
Error 81002 waiting for job
Broken pipe..
without - wait or jobstatus.. will it overcome the issue? or do we need to increast time out parameter.. i was searching for forum.. and my criteria didnt meet what am looking for...
Any help would be much appreciated...
-Basir
V'TH LUV
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: