Regarding Space with output

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
das_nirmalya
Participant
Posts: 59
Joined: Thu Mar 20, 2008 12:11 am

Regarding Space with output

Post by das_nirmalya »

I have used ExecuteCommandStage -----> Nested condition

Nested condition taking the Command Outpurt of ExecCommand Stage.

Exec Command use a unix command
cut -d , -f 1 filename , to Cut 1st char from a file.

Command giving proper output but it is adding extra space and line with the output value, so Nested condition stage is not working properly,, what is the solution??
nsd
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you sure it's a space, and not a newline? I suspect the latter, which will have been converted to a field mark (@FM). You need to remove whatever it is from the $CommandOutput activity variable, for example using Convert() or Trim() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

Try with the field function in nested activity stage
or
in the execute command stage use the shell scriot instead directly putting the command there and in the shell script just add extra logic to remove all the unwanted stuff.
Birendra
Post Reply