A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.
Moderators: chulett, rschirm, roy
-
agpt
- Participant
- Posts: 151
- Joined: Sun May 16, 2010 12:53 am
Post
by agpt »
Hi,
Can anybody tell me how to pass value returned by a unix script as a job parameter?
-
anbu
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 596
- Joined: Sat Feb 18, 2006 2:25 am
- Location: india
Post
by anbu »
Code: Select all
dsjob ... -param retValue=$(Unix_Script)
You are the creator of your destiny - Swami Vivekananda
-
agpt
- Participant
- Posts: 151
- Joined: Sun May 16, 2010 12:53 am
Post
by agpt »
anbu wrote:Code: Select all
dsjob ... -param retValue=$(Unix_Script)
thanks Anbu... Suppose I am using exec command stage for the same and the next job in the seq is user activity . how do i pass then ?
-
anbu
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 596
- Joined: Sat Feb 18, 2006 2:25 am
- Location: india
Post
by anbu »
Use commandOutput of Exec activity
You are the creator of your destiny - Swami Vivekananda
-
agpt
- Participant
- Posts: 151
- Joined: Sun May 16, 2010 12:53 am
Post
by agpt »
anbu wrote:Use commandOutput of Exec activity
what do i give in that? parameter name?
-
anbu
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 596
- Joined: Sat Feb 18, 2006 2:25 am
- Location: india
Post
by anbu »
Assign this as expression to the variable defined in User Activity
Code: Select all
<Exec_Activity_Name>.$CommandOutput
You are the creator of your destiny - Swami Vivekananda
-
chulett
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
Don't try to type it in manually, use the "..." Parameter Helper to make the proper choice and fill it in for you.
-craig
"You can never have too many knives" -- Logan Nine Fingers
-
agpt
- Participant
- Posts: 151
- Joined: Sun May 16, 2010 12:53 am
Post
by agpt »
thanks
-
agpt
- Participant
- Posts: 151
- Joined: Sun May 16, 2010 12:53 am
Post
by agpt »
chulett wrote:Don't try to type it in manually, use the "..." Parameter Helper to make the proper choice and fill it in for you. ...
Craig,
I believe same method can be used to pass multiple parameters if multiple values are returned by script?
-
chulett
- Charter Member
![Charter Member Charter Member](./images/ranks/charter_member%s.gif)
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
Yes. It can only return one result but you could parse one of multiple delimited values from there for different parameters.
-craig
"You can never have too many knives" -- Logan Nine Fingers
-
agpt
- Participant
- Posts: 151
- Joined: Sun May 16, 2010 12:53 am
Post
by agpt »
chulett wrote:Yes. It can only return one result but you could parse one of multiple delimited values from there for different parameters. ...
Thanks a lot!!!