Page 1 of 1
DS User Information
Posted: Fri Oct 17, 2008 2:59 am
by vasubabu
Hi,
My requirement is to populate a field in a table with the user detail who ran that job.
It may be anything, user Name or IP address or some unique value of the user.
Thanks,
Seema
Posted: Fri Oct 17, 2008 3:15 am
by DS_SUPPORT
System variable @LOGNAME will give you the user login name.
Posted: Wed Apr 08, 2009 1:27 am
by vasubabu
DS_SUPPORT wrote:System variable @LOGNAME will give you the user login name.
@LOGNAME will work in server jobs.
can you tell me what is the equalent function in in parellel?
Posted: Wed Apr 08, 2009 6:21 am
by Mike
$LOGNAME is an available environment variable, so
should do the trick.
Mike
Posted: Wed Apr 08, 2009 7:26 am
by ray.wurlod
I don't think that's true (if it were, it wouldn't have an "@" symbol in its name), but USER is an environment variable in most UNIX systems.
Posted: Wed Apr 08, 2009 7:42 am
by Mike
If you inspect the list of environment variables in the job log, you'll see LOGNAME. USER is there as well, but in my installation $USER is always "dsadm". $LOGNAME contains my OS user name.
I'm guessing that @LOGNAME in a server job must be getting set from $LOGNAME in the environment.
Mike