Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett , rschirm , roy
vasubabu
Participant
Posts: 153 Joined: Wed Jan 25, 2006 2:38 am
Post
by vasubabu » Fri Oct 17, 2008 2:59 am
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
VASU..
DS_SUPPORT
Premium Member
Posts: 232 Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore
Post
by DS_SUPPORT » Fri Oct 17, 2008 3:15 am
System variable @LOGNAME will give you the user login name.
vasubabu
Participant
Posts: 153 Joined: Wed Jan 25, 2006 2:38 am
Post
by vasubabu » Wed Apr 08, 2009 1:27 am
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?
VASU..
Mike
Premium Member
Posts: 1021 Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL
Post
by Mike » Wed Apr 08, 2009 6:21 am
$LOGNAME is an available environment variable, so
should do the trick.
Mike
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Apr 08, 2009 7:26 am
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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Mike
Premium Member
Posts: 1021 Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL
Post
by Mike » Wed Apr 08, 2009 7:42 am
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