Page 1 of 1

passing file path as a parameter to server routine

Posted: Thu Jun 10, 2010 4:01 am
by Sgiri1
Hi,

I need to parameterize the file path and pass it as an input to the routine. I tried using the rotuine stage. But it doesnt works.

check=''
Ans='error'
OpenSeq path_seq To tempvar Then
End
ReadSeq ChkLine From tempvar
Then
check = ChkLine
end
close tempvar

Ans=check

where path_seq is the path of my file....how do i pass it when the routine is invoked in a sequencer job?

Posted: Thu Jun 10, 2010 4:11 am
by ray.wurlod
As a Routine argument.

Or within your function using DSGetParamInfo(), but that will only work while the routine is being run from a job.

Posted: Thu Jun 10, 2010 5:49 am
by chulett
And their names will default to Arg1, Arg2 etc but you can change that and name them appropriately if you so desire.

Posted: Fri Jun 11, 2010 3:09 am
by Sgiri1
chulett wrote:And their names will default to Arg1, Arg2 etc but you can change that and name them appropriately if you so desire. ...
When i test the routine passing the path as a value for the argument the routine works fine. but in my sequence i assign this path to a aparameter in job properties and call this parameter in the routine activity stage in the sequence job. i need to pass this value as a parameter to next job. when run the sequencer the output of the routine activity stage is jus ''
please help me figuring out what went wrong

Posted: Fri Jun 11, 2010 4:29 am
by ray.wurlod
Put a DSLogInfo() call into your routine to report what pathname it received. Put DSLogInfo() calls into all four clauses of the OpenSeq statement to report which is taken. Put a DSLogInfo() call into the Then and Else clauses of the ReadSeq statement to report what happened and what was read.

Posted: Fri Jun 11, 2010 5:52 am
by chulett
Post the syntax you are using to call it and confirm you have the Job Parameter defined properly in the Sequence job that uses the Routine Activity.