Page 1 of 1

Regarding Setting Job parameters at run Time

Posted: Thu Apr 06, 2006 11:02 pm
by vinodhraj
Hi,

I am using FTP stage.
File to be FTPed to the NT Server from Unix platform.

file Naming convention would be:

FileName(Date)
for FileName - Job parameter
Date - Job parameter but needs to be set at the run time.

How can i set the job parameters at run time???

Thanks for ur replay in adavance.

Regards,
Vinodh

Posted: Fri Apr 07, 2006 12:16 am
by wnogalski
Create a job that takes a the filename and date parameters and in the transformer use SetJobUserStatus() to set a proper status that will be a concatenated filename and date.
In the sequence you can retrieve the returned status with .$UserStatus and pass it to the job that contains FTP stage.

Posted: Fri Apr 07, 2006 12:17 am
by ray.wurlod
Use whatever utility you are using to invoke the job. If a job sequence, pick up the file name from the job sequence; if the dsjob command pick up the file name (parameter value) from a -param option on the command line.

Re: Run Time Job Parameters

Posted: Fri Apr 07, 2006 2:49 am
by vinodhraj
wnogalski wrote:Create a job that takes a the filename and date parameters and in the transformer use SetJobUserStatus() to set a proper status that will be a concatenated filename and date.
In the sequence you can retrieve the returned status with .$UserStatus and pass it to the job that contains FTP stage.
Please explain step by step.
Thanks for ur replay.

Actually i want to write a Routine Activity which will set at the Runtime using the function DSSetParam

ErrCode = DSSetParam (JobHandle, ParamName, ParamValue)

Used to specify job parameter values prior to running a job. Any parameter not set will be defaulted.

Can u tell me which will works or not????

Posted: Fri Apr 07, 2006 3:57 pm
by ray.wurlod
A routine can not set a job parameter unless that same routine runs the job. You can use the routine to calculate the job parameter value, and use the return value from the routine to set the parameter value in a downstream Job activity.