Routine return value
Posted: Tue Jun 07, 2005 10:37 pm
I have created a routine Before/After Subroutine .
It has two parametrs: InputArg and ErrorCode
It's code is
ErrorCode = 0 ;* set this to non-zero to stop the stage/job
Cmd ='SELECT UNKNOWN_NUM FROM ':InputArg:';'
Call DSExecute('UV',Cmd,Value,Error);
ErrorCode =Value
InputArg will have a hash file name.
My requirement is i have to return the Routine output i,e value of ErrorCode. If that value is not 0 then i have to trigger the output link.
When i tried to test the routine, test button is disabled.
I used a routine activity stage namely "hash_sales_rep_key" and called this routine.In the trigger tab i used Custom -(Conditional) and the expression is hash_sales_rep_key.$ReturnValue>0. The problem is i checked the value for 'SELECT UNKNOWN_NUM FROM ':InputArg:'; It is 0. But the output link for the routine activity is triggering. It means hash_sales_rep_key.$ReturnValue>0 is true. How is this happening. Can you please tell me where i went wrong.
Thanks
It has two parametrs: InputArg and ErrorCode
It's code is
ErrorCode = 0 ;* set this to non-zero to stop the stage/job
Cmd ='SELECT UNKNOWN_NUM FROM ':InputArg:';'
Call DSExecute('UV',Cmd,Value,Error);
ErrorCode =Value
InputArg will have a hash file name.
My requirement is i have to return the Routine output i,e value of ErrorCode. If that value is not 0 then i have to trigger the output link.
When i tried to test the routine, test button is disabled.
I used a routine activity stage namely "hash_sales_rep_key" and called this routine.In the trigger tab i used Custom -(Conditional) and the expression is hash_sales_rep_key.$ReturnValue>0. The problem is i checked the value for 'SELECT UNKNOWN_NUM FROM ':InputArg:'; It is 0. But the output link for the routine activity is triggering. It means hash_sales_rep_key.$ReturnValue>0 is true. How is this happening. Can you please tell me where i went wrong.
Thanks