How to take the output of command activity stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bharatmajeti
Participant
Posts: 13
Joined: Mon Feb 18, 2008 7:28 am

How to take the output of command activity stage

Post by bharatmajeti »

Hi,
I have a sequencer where a Job activity stage follows a command activity stage. I want to return a value calculated in the shell script(command activity stage) to the job(Job activity) stage as one of the parameter in Job.

I tried to return value from the shell script. but it did not work out. can anybody suggest how to do this.
Nothing but something
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

"Did not work out" doesn't really help. Have your script echo your output and then use Stage.$CommandOutput<1> or Convert(@FM,"",Stage.$CommandOutput) in the Job Activity stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
cmunikoti
Participant
Posts: 18
Joined: Mon Jun 29, 2009 6:40 am

Output of command activity

Post by cmunikoti »

I was using return.value.when i used command.output it is working

Thanks chulett
:lol:
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

I am using command output and it works fine. I am using this to get the calculated output generated by the shell script.
What is the difference between return value and command output ?
I thought return value was for success and failure of a shell script

Regards
Sreeni
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, Return Value is for "success or failure". And like you, the OP had their's work fine as well when they switched to using Command Output, which is basically whatever the command echos to "the screen".
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply