Where COUNT_VALUE is the name of the exec command activity in your job sequence.
In the exec command activity just specify cat command.
Please do not quote the entire post while replying. It wastes a lot of space and makes the post difficult to read. Quote only if it is necessary.
Thanks for all the replies, when I parameterize the file path the cat does not work.The job itself is getting aborted.The log shows that cat cannot open the file.The cat command has been modified as :
you can't pass parameters in the command textbox of Execute Command activity. If you want to pass parameters you need to put them in the parameters textbox of the execute command activity.
Minhajuddin wrote:you can't pass parameters in the command textbox of Execute Command activity. If you want to pass parameters you need to put them in the parameters textbox of the execute command activity.
Thanks ,I have done the same. But how will the cat command get its file path. I am not supposed to hardcode it.
Thanks it worked , I would like to know what the Convert function is doin here, because only it worked and not the ActivityName.$Command output.
thanks for all the suggestions.
Line terminators are converted to field marks (@FM). The Convert() function removes them. When Craig suggested the <1> notation he was attempting to do the same thing, but one can never be totally sure that the result is in the first field (line) of output, which is why I prefer the Convert() approach.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod wrote:Line terminators are converted to field marks (@FM). The Convert() function removes them. When Craig suggested the <1> notation he was attempting to do the same thing, but one can never be totally sure that the result is in the first field (line) of output, which is why I prefer the Convert() approach.
When we tried using the $CommandOutput function as suggested by Craig it gave reverse results i.e. running for the 0 count and not running when count is 0, even though the expressions used in the respective links were correct but we did not use that <1> notation, what does that notation signify.
What is returned is a dynamic array, and that notation says you want to check only the first element in the array.
I agree with your point, Ray, and have used both notations. I prefer the one I posted and, when I use it, I ensure what I'm after is always in the first element. If at all possible.
-craig
"You can never have too many knives" -- Logan Nine Fingers
chulett wrote:What is returned is a dynamic array, and that notation says you want to check only the first element in the array.
I agree with your point, Ray, and have used both notations. I prefer the one I posted and, when I use it, I ensure what I'm after is always in the first element. If at all possible.
But when I use it in the expression along with the notation it gives me a syntax error.