Dynamic value for parameter in parameter set

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Dynamic value for parameter in parameter set

Post by nagarjuna »

I have a parameter set called param_set .I have created value file file1 .In this parameter set i have 20 parameters .One of the parameter is START_TIME .In parameter set and value file its value is 2006/01/01 .I want this paramter START_TIME should be equal to the time on which batch runs .

I am referring this parameter START_TIME in a job as param_set.START_TIME .In order to populate batch start time i am calling the job like this :

dsjob - run -param param_set=file1 -param param_set.START_TIME=`date +'%Y/%m/%d'` project_name job_name .

I am able to run the job and its population START_TIME with current batch time.

But when i put this job in a sequence its populating old value ( 2006/01/01 ) only .I am not able to get current batch time in it .


i am using below command :

dsjob - run -param param_set=file1 -param param_set.START_TIME=`date +'%Y/%m/%d'` project_name seq_name .

Can anyone suggest where i am going wrong ?

Thank you all

Nagarjuna
Nag
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Can you put an "echo" command into the script to ensure that the command line is working? Also, could your default date format be YYYY/DD/MM instead of the expected YYYY/MM/DD?
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

Thanks for your prompt reply

For an individual job , Its populating correctly .But when i am using sequence , its populating default value .
Nag
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

Arndw ,

I have small question . I am calling this job in a sequence .I have included param_set as parameter in job properties of sequence . when we double click the job activity in the job sequence , we will get mapping of job sequence parameters to job parameters . In that , what should be the value of param_set ? predefined or param_set or job sequence parameter ? will it make any difference ?? Please let me know if i am not clear in my question .

Thanks
Nagarjuna
Nag
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It would seem that you've located the source of the problem. I'm not at a datastage client where I can check, but I seem to recall you use the local definition when using a parameter set value within a sequence to pass on the value.
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

Thank you all ...It got resolved
Nag
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok, you should know the drill by now - what was the resolution?
-craig

"You can never have too many knives" -- Logan Nine Fingers
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Hi Nagarjuna,
Can you please provide us details on the resolution, as we are also facing the same problem
avicorp_1983
Participant
Posts: 2
Joined: Thu Nov 10, 2011 11:54 pm
Location: Mumbai

double click the job activity in the job sequence , we will

Post by avicorp_1983 »

HI Sysnog,
If you read nagarjuna post carefully you will find the answer there if self.
Or
See the setting in the Job activity for your job.

Regards,

S_K_G_1983
it's my life
Post Reply