GetEnvironment("ISUSER") in Sequencer

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ejazsalim
Premium Member
Premium Member
Posts: 51
Joined: Wed Apr 09, 2003 6:42 am
Location: VA, USA

GetEnvironment("ISUSER") in Sequencer

Post by ejazsalim »

Is it possible to get the userid of the person running a sequencer "GetEnvironment("ISUSER")" this works in a job but when I tried using this in USERVARIABLE in a Sequencer Job the job wouldn't compile.

My question how can i get the USER in a sequencer @LOGNAME gives me the dsadm id which is running the ds server.

We are using LDAP authentication.

Thanks
Ejaz
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

GetEnvironment() is only available in parallel jobs.

Please perform this test. In an Execute Command activity in a sequence execute the id command to find out the user that actually runs your jobs.

Then we may talk further about whether there's some easier way to determine that user's identity at run time.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ejazsalim
Premium Member
Premium Member
Posts: 51
Joined: Wed Apr 09, 2003 6:42 am
Location: VA, USA

Post by ejazsalim »

ray.wurlod wrote:GetEnvironment() is only available in parallel jobs.

Please perform this test. In an Execute Command activity in a sequence execute the id command to find out the user that actually runs yo ...
I am using parallel jobs.

In the director logs I do see that ISUSER has my login id but I cannot get it into a uservariable so I can pass it on downstream
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please tell us what the id command returns. You may be surprised.

There's no reason you can't execute a command to get the value of an environment variable, such as echo $ISUSER - that value will be available as the output value of the Execute Command activity - possibly with added linefeeds converted to field marks.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

You are executing parallel jobs using a sequencer, which is NOT a parallel job...it is a Server job. GetEnvironment() is available only in a parallel transformer.

Would passing ISUSER as a sequencer parameter for the sequencer give the desired result? Add a new environment variable ISUSER and assign it the value $ENV in the sequencer parameter list.
- james wiles


All generalizations are false, including this one - Mark Twain.
ejazsalim
Premium Member
Premium Member
Posts: 51
Joined: Wed Apr 09, 2003 6:42 am
Location: VA, USA

Post by ejazsalim »

Thanks Ray and Jwiles.

echo $ISUSER worked

Ray I did not quite understand what you wanted me to do with the id command when I run that on unix it gives me the below output

jwiles that a very elegant way of doing it through $ENV
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I wanted you to run id in an Execute Command activity then view its output for the user who executes jobs in the job log.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply