In <[EMAIL PROTECTED]>, on 05/18/2005
at 11:24 AM, "John Renton (improvIT Consulting GmbH)"
<[EMAIL PROTECTED]> said:
>I have a slightly off topic question. I am running a rexx within USS
>as a subtask (thread) of a java process. The thread has been started
>with a different user (ie from the parent task). This all works fine.
>I am now in the rexx and tried establishing the userid under which I
>am running using the REXX function USERID(). The function returns the
>userid of the parent task and not the user of the thread I am running
>under.
>I received the following suggestion from the TSO-REXX listserv:
>ascbstor = storage(c2x(storage(224,4)),140)
>asxbstor = storage(c2x(substr(ascbstor,109,4)),8)
>@tcb = c2x(substr(asxbstor,5))
>@jscb = c2x(right(storage(@tcb,x2d(b4)+4),4))
>@ssib = c2x(right(storage(@jscb,x2d(13c)+4),4))
>@sjb = c2x(right(storage(@ssib,x2d(20)+4),4))
>@jct = c2x(right(storage(@sjb,x2d(24)+4),4))
>parse value(storage(@jct,x2d(2c0))) with 289 jobid 297 443 acid
>451
I would expect both to return the same thing, the userid of the job.
>The value I am trying to find corresponds (for example) to the user
>shown in the system log when a RACF access error occurs.
Have you tried TCBSENV?
>Now my question - does anyone know where or how I can find the user
>of the subtask?
Capture the output of a Unix (not USS) command, e.g., ps. I don't
recall if there is a command and option to return only information on
your current process, but, if not, it shouldn't be hard to parse and
trim the output. You might also check whether there is a geteuid
facility in either REXX of the Unix System Services shell.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
ISO position; see <http://patriot.net/~shmuel/resume/brief.html>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html