Regarding Setting Job parameters at run Time

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinodhraj
Participant
Posts: 53
Joined: Mon Sep 12, 2005 6:51 am

Regarding Setting Job parameters at run Time

Post 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
wnogalski
Charter Member
Charter Member
Posts: 54
Joined: Thu Jan 06, 2005 10:49 am
Location: Warsaw

Post 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.
Last edited by wnogalski on Fri Apr 07, 2006 12:20 am, edited 1 time in total.
Regards,
Wojciech Nogalski
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinodhraj
Participant
Posts: 53
Joined: Mon Sep 12, 2005 6:51 am

Re: Run Time Job Parameters

Post 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????
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply