Page 1 of 1

Meaning of the "USER" environment variable in the

Posted: Wed Apr 02, 2014 1:58 pm
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

Posted: Wed Apr 02, 2014 3:41 pm
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.

Posted: Wed Apr 02, 2014 4:26 pm
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

Posted: Wed Apr 02, 2014 5:29 pm
by ray.wurlod
Don't believe so. We use ISUSER for all identification fields (such as created_by, updated_by).

Posted: Wed Apr 02, 2014 5:55 pm
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

Posted: Thu Apr 03, 2014 7:33 am
by priyadarshikunal
Are all the GUI users mapped to the same user in credential mapping?

Posted: Thu Apr 03, 2014 7:44 am
by mctny
Nope, I asked the admin and checked together it was not the same.

Posted: Thu Apr 03, 2014 3:08 pm
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.

Posted: Fri Apr 04, 2014 11:18 am
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