Regarding Parameters

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

vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Regarding Parameters

Post 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
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post 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#?
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post 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
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Are you giving a default value for there Environment Variables in DS Administrator?
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post 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
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

What is the exact version of DataStage are you on?
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

Hi Gurus,
Iam working on DataStage Version 7.5.

cheers;
vijay
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Give this a try -
Delete the Parameter in the Job Properties and add it again.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post 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.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post 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
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post 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
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Yes, that was fixed in 7.5.1A and higher.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply