Meaning of the "USER" environment variable in the

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Meaning of the "USER" environment variable in the

Post by mctny »

Hi Everybody,

I was wondering if anyone knows what does the "USER=XXXXX" in the directory second log entry mean? in my log, it just appear just before the environment variable "WHO" which represent the project name.

I could not find what it represent, it does not represent who ran the job though.

Thanks in advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

USER is the standard UNIX environment variable. It's the user ID of the user who is logged in - the identity under which the job run request was made.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

Thanks Ray, I guess it can be set to any value and it can not be trusted ( do not mean much). Because in our case, the value of the USER is same for all the job logs, no matter who runs it ( the ISUSER shows that information). it is also not the person who started the DataStage engine, it is not the person who deployed the jobs, so the only explanation is , in every user's UNIX profile, the USER environment variable is set to the same value and not to their user id. any other explanation for this case?

Thanks again
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't believe so. We use ISUSER for all identification fields (such as created_by, updated_by).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

Hi Ray, yes, sorry I guess I wasn't clear on my previous post. "ISUSER" shows who ran the job. But "USER" does not. I just wanted to understand why value for "USER" is same for all job logs.

Thanks
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Are all the GUI users mapped to the same user in credential mapping?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

Nope, I asked the admin and checked together it was not the same.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

On AIX at least the USER environment variable uses details from /etc/environment and also (maybe) your own profile under your home directory. The content of /etc/environment is the same for all users. If USER is not updated in ~/.profile, then it will be the same for all users.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

Thanks again Ray, We have SunOS so I could not find the environment folder under /etc (or my userid does not allow me to see it.) The interesintg thing is that when I login to my unix account via shell and do echo $USER it shows my userid, however if I create a dummy parallel job and use the same command ( echo $USER ) in the execSH in the before-job subroutine it shows ( in the command output) the common person's userid in the datastage log which is the same as the one in the second entry in the log.

my local.profile in unix has the following only

stty istrip
PATH=....... :.
export PATH

Thanks,
Chad
Post Reply