Hi,
I was wondering if I can use the $ISUSER environment variable ( either directly or via a function) in a server routine to get the user who execute the job? I am calling the routine from a user variables activity stage within a job sequencer.
Thanks,
Chad
is $ISUSER available in server routines?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Sure can. But you have to invoke a command, through DSExecute. You may as well use an operating system shell command (echo) in that case.
Code: Select all
Call DSExecute("SH", "echo $ISUSER", Output, ExitStatus)
Ans = Output<1>
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I am reopening this because I came across a small issue during a special case.
When someone runs the job $ISUSER thing work but if the job is scheduled then $ISUSER is not available.
I actually looked at the second log entries of the same job in director, one is when the job is run by any user and the other one is when I schedule the job through a crontab wrapper script. in the later case there was no $ISUSER entry.
any ideas as what to do to get the username when the job is scheduled?
When someone runs the job $ISUSER thing work but if the job is scheduled then $ISUSER is not available.
I actually looked at the second log entries of the same job in director, one is when the job is run by any user and the other one is when I schedule the job through a crontab wrapper script. in the later case there was no $ISUSER entry.
any ideas as what to do to get the username when the job is scheduled?