Page 1 of 2

Regarding Parameters

Posted: Tue Jan 09, 2007 12:52 pm
by vijaykumar
Hi Gurus,

With respect to parameters.

My friend is using parameter for table name(ie) he defined a parameter for table name.The value of the parameter is default value $PROJDEF.
what happens is that when i try to run the job, it asks for parameter values.Why does it asks for the supplied value, with the PROJDEF iam getting error. Is it not possible to trace the actual value supplied to the parameter.Plz help me Gurus.

cheers;
vijay

Posted: Tue Jan 09, 2007 12:55 pm
by Krazykoolrohit
you can trace the actual value supplied by looking into the director. see the first line of the job log.

post the error you are getting. Most probably its the table name that you have configured wrong. $PROJDEF should work fine. How has "your friend" put in the parameter in the stage? did he do something like #$PARAMETER#?

Posted: Tue Jan 09, 2007 1:01 pm
by vijaykumar
Hi Gurus,
When i compile its running fine, But for running i need to supply the actual value, So this is what happening.Plz help me Gurus.

cheers;
vijay

Posted: Tue Jan 09, 2007 1:04 pm
by narasimha
Are you giving a default value for there Environment Variables in DS Administrator?

Posted: Tue Jan 09, 2007 1:20 pm
by I_Server_Whale
First of all, did you define the environment variable for the table name in the DS administrator? And like Narasimha asks, did you give a default value to it?

Whale.

Posted: Tue Jan 09, 2007 1:56 pm
by ray.wurlod
What is the default value set in the Administrator client for this environment variable?

It can not be $PROJDEF, $ENV or $UNSET; it must be a "proper" value. $PROJDEF is only to use as the default value of a job parameter, not of an environment variable.

Posted: Tue Jan 09, 2007 1:56 pm
by vijaykumar
Hi,
I have created environmental variable in Administrator.
for ex:

name prompt type value

username enter the user name string scott

Iam calling this parameter at joblevel,

At Job level , i changed parameters value to default value $PROJDEF.

name prompt type value
$user name enter user name string $PROJDEF.

Iam using this parameter in source and target stage.

when i compile and run the job, As usual a tab comesup ,
ENTER THE USER NAME - when it takes the default value $PROJDEF and returns error- saying that the username supplied is incorrect.
When i enter the Actual value-Scott, its working fine.why is it happening.
plz help me.

cheers;
vijay

Posted: Tue Jan 09, 2007 2:01 pm
by I_Server_Whale
What is the exact version of DataStage are you on?

Posted: Tue Jan 09, 2007 2:04 pm
by vijaykumar
Hi Gurus,
Iam working on DataStage Version 7.5.

cheers;
vijay

Posted: Tue Jan 09, 2007 2:06 pm
by narasimha
Give this a try -
Delete the Parameter in the Job Properties and add it again.

Posted: Tue Jan 09, 2007 2:09 pm
by us1aslam1us
You had created the Env Variables in Administrator with default values then I guess you are doing some typing error.

Try doing this

At Job level click the 'Add Environment Variables' >> 'user defined' and click on the parameters you need to use, it will get populated here.

Posted: Tue Jan 09, 2007 2:18 pm
by vijaykumar
Hi Gurus,
When i use the parameter in the source stage iam not getting any error.
Its running fine, if i use the same parameter in the target stage iam getting error.Even when i want to view the data from source stage, it says $PROJDEF is incorrect, unable to connect to database with the value supplied.

what i mean what i found is we need to supply actual value of the parameter if we want to view the data, with the default env variable its not working.
plz help me.
cheers;
vijay

Posted: Tue Jan 09, 2007 3:25 pm
by vijaykumar
Hi Gurus,
Is there any new feature added to datastage.when i want to view the data it doesn't accept the default ENV value, instead it prompts for actual value.
I think life becomes difficult, if we go on give actual value.
Plz gurus help me am I going in the right way.

cheers;
vijay

Posted: Tue Jan 09, 2007 3:31 pm
by I_Server_Whale
vijaykumar wrote:Hi Gurus,
Iam working on DataStage Version 7.5.

cheers;
vijay
Is this the exact version? Check the version by going to the 'Help' menu of the DS designer and clicking on 'About DataStage Designer' and post it.

Because there are versions where $PROJDEF doesn't work. One of them is 7.5x2. Not sure if there is any patch available.

Whale.

Posted: Tue Jan 09, 2007 3:31 pm
by DSguru2B
Yes, that was fixed in 7.5.1A and higher.