How to assign $Var value to Param value

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

Moderators: chulett, rschirm, roy

SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

How to assign $Var value to Param value

Post by SURA »

Hi there

Just a thought.

Is it possible to assign a $VALUE to a Parameter in the Parameter set?

For example:

I have a parameter set having LND_PWD as the parameter name.

I have a user defined variable called $LND_PWD.

Now I wish to know, is there is any way i can assign the $LND_PWD to LND_PWD in the parameter set.

Is it possible to do?

DS User
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Yes. it is.
Kandy
_________________
Try and Try again…You will succeed atlast!!
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Thanks for the response.

Is it documented any where?

DS User
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

SURA wrote:Is it documented any where?DS User
I don't know.

If your password is encrypted type, just make sure that you enter exactly what you need. e.g. $VALUE, $ORA_PWD etc
Last edited by kandyshandy on Sun Feb 19, 2012 8:08 pm, edited 1 time in total.
Kandy
_________________
Try and Try again…You will succeed atlast!!
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

If you password is encrypted type, just make sure that you enter exactly what you need. e.g. $VALUE, $ORA_PWD etc
Thanks again for your comment.

I already tried like $LND_PWD , but unfortunately it is not working for me!


DS User
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

It's not working...
then tell us what's happening or what error you are facing? did you check the director log to see what's getting passed actually?
Kandy
_________________
Try and Try again…You will succeed atlast!!
v2kmadhav
Premium Member
Premium Member
Posts: 78
Joined: Fri May 26, 2006 7:31 am
Location: London

Post by v2kmadhav »

are you saying you need $LND_PWD to be the value of the paramter LND_PWD .... it wont be possible. You could create a user defined variable $LND_PWD and call that as a paramter in your paramset.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

I trust there might be a gap in the way how i expressed / understanding.

Let me ask it again!!

Step 1) A parameter set is created which is having a param name called LND_PWD.

Step 2) I created a user defined variable $DB_PWD in the admin client.

In the Parameter Set (Not in the job) for the LND_PWD param i wish to get the value from $DB_PWD and not the hardcoded value.

To achieve that , if i pass #$DB_PWD# in the default value of LND_PWD will it help me to get the value from $DB_PWD (Admin)??

Or

How to do it?

When i assign the value as #$DB_PWD# in the default value of LND_PWD in the Parameter set i got the below error.

main_program: Fatal Error: Could not connect to datasource?? (-1; test; TEST; [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'test'.) : [odbcUtils.C:206]


Let me know if i missed to provide any information !

Thanks
DS User
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

SURA wrote:To achieve that , if i pass #$DB_PWD# in the default value of LND_PWD will it help me to get the value from $DB_PWD (Admin)??
Don't use #. Just pass $DB_PWD in the default value. You are all set.
Kandy
_________________
Try and Try again…You will succeed atlast!!
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

No luck Kandy.

DS User
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Try $PROJDEF
Kandy
_________________
Try and Try again…You will succeed atlast!!
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Just i got an email from IBM in this regards. IBM confirmed; we cant do this. So it may not be possible at this moment. If any of you did this, please share the details with me.

Thanks
DS User
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

oh.. :shock:

Job aborted with some error and that's fine. Did you check what is actually passed to the job at the first place? I am asking you this for the second time ;)
Kandy
_________________
Try and Try again…You will succeed atlast!!
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

sorry Kandy

I fails to add that info.

It is passing the value as it is: $DB_PWD

Thanks
DS User
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

IBM conlcuded, cant pass the $VALUE to a PARAM VALUE in the Parameter set.


Thanks to all.

DS User
Post Reply