Command output of ExecCommand
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I am caling the UtilityMessageToLog from the RoutineActivity stage. Now, in the RoutineActivity stage, I have:
RoutineName: UtilityMessageToLog
Value Expression: ReadFile.$CommandOutput
I am still getting the same error. I'll keep doing research on this forum on this error. Please let me know if I can provide any more information.
RoutineName: UtilityMessageToLog
Value Expression: ReadFile.$CommandOutput
I am still getting the same error. I'll keep doing research on this forum on this error. Please let me know if I can provide any more information.
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You're not done yet. What is it that is causing the activity to fail? If it's the Execute Command activity, this is an exit status other than zero; you may need to make a small adjustment in your shell script (exit 0).
You still have not properly gathered the command output either - or, if you have, you have not posted that you have.
You still have not properly gathered the command output either - or, if you have, you have not posted that you have.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
After using absolute path, proper value is returned by the Linux script. After that, if I use Field(ExecCmd.$CommandOutput, @FM,1,1) or ExecCmd.$CommandOutput wihtout Field, it works.
The RoutineActivity call to UtilityMessageToLog returns a 1. When I check "Automatically Handle Activitties That Fail", it interpretes this as an error and the sequence aborts.
If you have an idea so that I can avoid this without unchecking this property, I would really like to hear it.
The RoutineActivity call to UtilityMessageToLog returns a 1. When I check "Automatically Handle Activitties That Fail", it interpretes this as an error and the sequence aborts.
If you have an idea so that I can avoid this without unchecking this property, I would really like to hear it.
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You don't really need a custom trigger. The thing about the 'automatically handle' option is that it only kicks in it "needs to" - when you don't handle errors. The online help spells it out for you, but basically make it think you've got all the bases covered and those kind of 'failures' won't be an issue.
For example, a typical pair of triggers that shut down the 'automatic' option would be an 'Ok (Conditional)' and an 'Otherwise' link. In your case, the 'Otherwise' link is the one that is actually your expected path but both are needed - send them both to a Sequencer set to 'Any' and then from there to your next step. The 'automatically handle' option can now be turned back on and will function for all of the other activities in your Sequence.
For example, a typical pair of triggers that shut down the 'automatic' option would be an 'Ok (Conditional)' and an 'Otherwise' link. In your case, the 'Otherwise' link is the one that is actually your expected path but both are needed - send them both to a Sequencer set to 'Any' and then from there to your next step. The 'automatically handle' option can now be turned back on and will function for all of the other activities in your Sequence.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
The output from the ExecCommand is sometimes appended at the end with a newline character. I ran into a similar problem and selected the leftmost byte from the command output _$CommandOutput that was numeric. I could run my job activity with that. You probably need to find out how to just select numeric characters out of the command output and you should be fine.abc123 wrote:Craig, that was the issue. The relative path. My ExecCommand produces the right values. However, the RoutineActivity still errors out. I still get the error:
Controller problem: Unhandled failure (1) encountered calling routine DSX.UTILITYMESSAGETOLOG
In the RoutineActivity stage, I am selecting Routine Name as UtilityMessageToLog and in Value Expression for Arg1, I have:
Field(ReadFile.$CommandOutput, @FM,1)
Thanks
- Deejje

