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?
System variables
Moderators: chulett, rschirm, roy
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.
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.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
System environment variables
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.
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
JAGS
System environment variables
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.
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
JAGS
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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 that.
You CAN use environment variables as job parameters in DataStage jobs. Beware, however, that some Windows operating systems require you to re-boot after changing/setting an environment variable through the Control Panel. It may be better to create them through the DataStage Administrator client: select your project, go to the Properties window and click the Environment button.
You CAN use environment variables as job parameters in DataStage jobs. Beware, however, that some Windows operating systems require you to re-boot after changing/setting an environment variable through the Control Panel. It may be better to create them through the DataStage Administrator client: select your project, go to the Properties window and click the Environment button.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Jags,
that is not what I said, in fact I said
that is not what I said, in fact I said
. 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.You can create and access your own environment variables
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>