Calling Unix command from User variable activity stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajudx
Participant
Posts: 45
Joined: Tue Nov 14, 2006 1:58 pm
Location: NJ

Calling Unix command from User variable activity stage

Post by rajudx »

Hi,

I need to call the one UNIX command and I have to use that command result in nested condition stage.Is it possible to call the UNIX command from user variable activity stage.Please provide the syntax.


Thanks,
N.Raju.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Why not just call the UNIX command from a command stage, then refer to the result in your user variable activity stage.
rajudx
Participant
Posts: 45
Joined: Tue Nov 14, 2006 1:58 pm
Location: NJ

Re: Calling Unix command from User variable activity stage

Post by rajudx »

Hi ArndW,

If i will call the Unix command from command satge how can I capture the command stage result into User variable activity stage.


Thanks,
N.Raju
Ran
rajudx
Participant
Posts: 45
Joined: Tue Nov 14, 2006 1:58 pm
Location: NJ

Re: Calling Unix command from User variable activity stage

Post by rajudx »

Hi ArndW,

If i will call the Unix command from command satge how can I capture the command stage result into User variable activity stage.


Thanks,
N.Raju
Ran
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In the user-variable stage, use the drop-down select list in the derivation to get the return value from your UNIX command stage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Calling Unix command from User variable activity stage

Post by ray.wurlod »

rajudx wrote:Hi ArndW,

If i will call the Unix command from command satge how can I capture the command stage result into User variable activity stage.


Thanks,
N.Raju
Using the Execute Command activity's $CommandOutput activity variable in the definition of the user variable. You may need to remove field mark (@FM) characters from that output.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply