Page 1 of 1

Problem with Execute_Command.$CommandOutput value

Posted: Mon May 05, 2008 4:23 pm
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.

Posted: Mon May 05, 2008 4:35 pm
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))

Posted: Mon May 05, 2008 5:05 pm
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.

Posted: Fri May 09, 2008 12:57 pm
by kishorenvkb
Worked for me too...