Page 1 of 1

Setting Command Output to the job parameter

Posted: Thu May 28, 2009 10:20 pm
by datisaq
I have a job design:

Execute Command Activity ----> Job Activity Stage.

In Execute Command activity stage i'm reading a sequential file which is having only one value using the "cat" command.

The output of the "cat" is passed to the parameter of the job which is called in next stage.
MaxVal(Prameter) ---> $CommandOutput.

But my job is getting aborted, when i'm setting the above value.

Can anyone tell me how to set the command output to the parameter?

Any help will greatly appreciated..

Posted: Thu May 28, 2009 10:43 pm
by chulett
Do we have to guess your error? Here's mine! [drumroll] The dreaded "[ParamValue/Limitvalue is not appropriate]" error? If so, a search for that phrase will reveal the solution.

Posted: Thu May 28, 2009 10:48 pm
by arvind_ds
Use a variable activity stage after your execute command stage and in the value expression of variable stage use field function to retrieve the output of execute command and pass the variable's value further to your next job activity stage in your job sequence.

HTH

Posted: Thu May 28, 2009 10:53 pm
by chulett
You should be able to do that directly in the Job Activity parameter assignment field... assuming we know what the actual problem is.

Posted: Thu May 28, 2009 11:11 pm
by datisaq
You're absolutely correct craig the problem is the same.
I set the datatype as "integer" in the sequential file and i kept quote as "none".But the same error.

Could you please tell me craig how to resolve this..

Please help me out..

Posted: Thu May 28, 2009 11:26 pm
by chulett
I already did! It's been reported and solved here many times, search for that phrase to find them.

Setting Command Output to the job parameter

Posted: Thu May 28, 2009 11:36 pm
by ajay.vaidyanathan
Hi,
U cannot directly use MAX() in $CommandOutput. If dis is wat u r doing, den its wrong. If gettin MAX value is wat ur requirement all about, den try fetchin it at ur UNIX lvl interface b4 performin it at DS lvl. Once u 've ur MAX value frm UNIX, den u can go ahead n use it in ur job usin a Command Activity stage n later use $CommandOutput to fetch its value.

Hope dis resolves ur prob requirement. Let me know if dis has helped u out r not.

Posted: Thu May 28, 2009 11:50 pm
by chulett
Good Lord, is that a sample of your work site documention / composition skills? Please cease with the texty-chatty-dis-den-dat-ur-wat crap and use a professional level of English here. Use all of your fingers to type, not just your thumbs and spell out your dang words. Please. :evil:

Posted: Thu May 28, 2009 11:52 pm
by Kryt0n
The only word missing there is "innit"

Posted: Fri May 29, 2009 12:00 am
by chulett
Word! [gangsta pose]

Setting Command Output to the job parameter

Posted: Fri May 29, 2009 12:46 am
by ajay.vaidyanathan
Sorry guys....will definitely keep it in mind.....

Posted: Fri May 29, 2009 10:22 am
by datisaq
Thanks Craig, i got the output after searching in the forum.

Posted: Fri May 29, 2009 10:44 am
by chulett
8) Thanks, always best to search first as (more than likely) you're not the first to encounter the problem.