DS User Information

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

Post Reply
vasubabu
Participant
Posts: 153
Joined: Wed Jan 25, 2006 2:38 am

DS User Information

Post 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
VASU..
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

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 »

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
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

$LOGNAME is an available environment variable, so

Code: Select all

GetEnvironment("LOGNAME")
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 »

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
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post 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
Post Reply