Hi all,
My requirement is first write aunix shell script which checks if stop.txt file exists on remote machine or not. If stop.txt file exists my unix returns a integer value 1. Other wise it will run the rest of the script and returns integer value 0.
Unix script is running fine but problem with datastage Datastage requirement:If unix script returns a value 1 it should not run the next job. I tried using command output and return value from execute command in sequence, trigger but it is going to next job how to stop next job can any one can share ideas please it is urgent..
Thanks
marpadga
how to stop job after unix script returns value 1
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
The basic approach you chose by calling the script via the execute command stage is the correct method. But you aren't interpreting the returned string correctly - most likely due to extraneous new line character(s).
Output your returned value to the log file to see what you've got.
p.s. Any post marked "urgent" is usually processed as "non-urgent" in this forum - if it is truly an urgent issue then you should contact your support provider as you are paying them for prompt attention while this forum is staffed exclusivel by volunteers.
Output your returned value to the log file to see what you've got.
p.s. Any post marked "urgent" is usually processed as "non-urgent" in this forum - if it is truly an urgent issue then you should contact your support provider as you are paying them for prompt attention while this forum is staffed exclusivel by volunteers.
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
how to stop job after unix script returns value 1
sorry @ArndW i am new to forum...
this is the meesage I am getting in director log MAIN_SEQ_VAT_UK_LOAD..JobControl (@EX_SH_test): Executed: /local/apps/Datastage/projects/xxx_xxxx_xxx/Scripts/test.ksh
Reply=0
Output from command ====>
1
in the execute command I am doing like this correct me if I am wrong
Expression type Trigger
custom EX_SH_test.$CommandOutput <>1
then also it going to the next job. this is the correct way? could anyone can tell any ideas
can you give any idea how to go ahead. any ideas.
this is the meesage I am getting in director log MAIN_SEQ_VAT_UK_LOAD..JobControl (@EX_SH_test): Executed: /local/apps/Datastage/projects/xxx_xxxx_xxx/Scripts/test.ksh
Reply=0
Output from command ====>
1
in the execute command I am doing like this correct me if I am wrong
Expression type Trigger
custom EX_SH_test.$CommandOutput <>1
then also it going to the next job. this is the correct way? could anyone can tell any ideas
can you give any idea how to go ahead. any ideas.
Thanks,
M
M
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
I tried two thingschulett wrote:You need to remove the Field Mark(s) that they return with:
Convert(@FM,"",custom EX_SH_test.$CommandOutput) <> 1 ...
1)Convert("1",EX_SH_test.$CommandOutput) <> 1 it is saying genral synatx error.
2)Convert(@,"", EX_SH_test.$CommandOutput) <> 1
warning: Variable '@' not defined
Could you correct me were i am doing wrong?
Thanks,
M
M
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am
hey chutlet... I tried this
Convert(@FM,"", EX_SH_test.$CommandOutput) <> 1
now it is working fine but can you expalin about this functionality. I got the result but not able to understand the logic.Could you explain so that every body who reads this post can understand.
Thanks for your help chutlet
:):)
Convert(@FM,"", EX_SH_test.$CommandOutput) <> 1
now it is working fine but can you expalin about this functionality. I got the result but not able to understand the logic.Could you explain so that every body who reads this post can understand.
Thanks for your help chutlet
![Smile :)](./images/smilies/icon_smile.gif)
Thanks,
M
M
So, it worked more better when you used the actual syntax I posted I see.
It's been explained here quite a number of times already. Best thing I can tell you to do is search for the error message that usually starts this conversation and you'll find plenty of examples.
Do an exact search for "[ParamValue/Limitvalue is not appropriate]" without the quotes.
![Wink :wink:](./images/smilies/icon_wink.gif)
It's been explained here quite a number of times already. Best thing I can tell you to do is search for the error message that usually starts this conversation and you'll find plenty of examples.
Do an exact search for "[ParamValue/Limitvalue is not appropriate]" without the quotes.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 96
- Joined: Fri Aug 20, 2010 8:51 am