Problem with Execute_Command.$CommandOutput value

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
dsguy1247
Premium Member
Premium Member
Posts: 33
Joined: Wed Feb 04, 2004 6:35 am
Contact:

Problem with Execute_Command.$CommandOutput value

Post by dsguy1247 »

I have a sequence which runs a job to create a file showing number of rows of a table.

Then I am using an Execute command stage to read the file.

Then I am using user activity variable stage to read Execute_Command.$CommandOutput in a USER VARIABLE (ROWCNT)

In the User Variable stage I have used the functions :

1. Convert(@FM,'', cat_SPO_CNT.$CommandOutput)
OR
2. Field(cat_SPO_CNT.$CommandOutput,@FM,1)

Later In a Nested_Condition stage I am checking the value of user variable
ROWCNT to send it to next link.

UV_ROWCNT.ROWCNT=0 OR UV_ROWCNT.ROWCNT="0"

But it is not working correctly.

Please let me know if you have any answer.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about you tell us the contents of the file (with line terminators).

You might need to wrap a Trim() function around the function that you already have.

Code: Select all

Trim(Trim(cat_SPO_CNT.$CommandOutput,@FM,"A"))

Code: Select all

Trim(Convert(@FM,"", cat_SPO_CNT.$CommandOutput))

Code: Select all

Trim(Field(cat_SPO_CNT.$CommandOutput,@FM,1))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsguy1247
Premium Member
Premium Member
Posts: 33
Joined: Wed Feb 04, 2004 6:35 am
Contact:

Post by dsguy1247 »

In the job which was creating the file. The rowcount was in quotes. Modified the job to remove the quotes and it is working fine now. thanks.
kishorenvkb
Participant
Posts: 54
Joined: Mon Dec 24, 2007 9:27 am

Post by kishorenvkb »

Worked for me too...
Post Reply