DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
jagadhish
Participant



Joined: 19 Jan 2006
Posts: 14

Points: 131

Post Posted: Wed Mar 15, 2006 3:42 am Reply with quote    Back to top    

DataStage® Release: 7x
Job Type: Server
OS: Unix
Hi Everyone,

Need some help with accessing system variables in datastage.
I know that we can access a pre-definded system variables using @LOGNAME, @PATH and so on.
But if I create a new system variable, how can I access that variable in datastage?

_________________
REGARDS,
JAGS
ArndW

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 16 Nov 2004
Posts: 15926
Location: Germany
Points: 90069

Post Posted: Wed Mar 15, 2006 3:51 am Reply with quote    Back to top    

You cannot create your own system variables in DataStage.

You can create and access your own environment variables. You can create your own routines and functions which can be accessed as if they were system variables.

_________________

Image
Rate this response:  
Not yet rated
jagadhish
Participant



Joined: 19 Jan 2006
Posts: 14

Points: 131

Post Posted: Wed Mar 15, 2006 4:10 am Reply with quote    Back to top    

Thanks Arnd.

Just to make things a little more clear,
I have created a system environment variable in Windows (say, Variable Name = username and Variable Value = abc).
Can I use this environment variable(i.e. username) in a DataStage job.

From what I made out from your previous reply, you said that this can't be done. Is that correct?

Thanks.

_________________
REGARDS,
JAGS
Rate this response:  
Not yet rated
jagadhish
Participant



Joined: 19 Jan 2006
Posts: 14

Points: 131

Post Posted: Wed Mar 15, 2006 4:10 am Reply with quote    Back to top    

Thanks Arnd.

Just to make things a little more clear,
I have created a system environment variable in Windows (say, Variable Name = username and Variable Value = abc).
Can I use this environment variable(i.e. username) in a DataStage job.

From what I made out from your previous reply, you said that this can't be done. Is that correct?

Thanks.

_________________
REGARDS,
JAGS
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 51931
Location: Sydney, Australia
Points: 281976

Post Posted: Wed Mar 15, 2006 6:06 am Reply with quote    Back to top    

There are six system variables there for you to use. Their names are @USER.RETURN.CODE and @USER0 through @USER4. They are automatically initialized to zero, but remain untouched by DataStage after ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Sydney and Melbourne
Rate this response:  
Not yet rated
ArndW

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 16 Nov 2004
Posts: 15926
Location: Germany
Points: 90069

Post Posted: Wed Mar 15, 2006 6:55 am Reply with quote    Back to top    

Jags,

that is not what I said, in fact I said
Quote:
You can create and access your own environment variables
. As Ray has shown, you can use the DataStage environment variables. Another option is to write a small routine which SHells out to the operating system and gets the value of a runtime environment variable and then returns that to the caller.

_________________

Image
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours