It would definitely be more fun if two different users had the same UID.

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Paul Gilmartin [[email protected]]
Sent: Wednesday, February 16, 2022 3:51 PM
To: [email protected]
Subject: Re: How to Get UserID in non-TSO REXX

On Wed, 16 Feb 2022 12:42:13 -0800, Ed Jaffe wrote:

>On 2/16/2022 11:11 AM, Steve Smith wrote:
>> Is there any way to obtain the userid (user name) in REXX running in a
>> non-TSO environment?  I know that sysvar does not work in USS, IRXJCL, or
>> System REXX TSO=NO.  Whereas mvsvar does (go figure).  It's so fundamental
>> that I think I can't be the first one to need this.
>
>Did you try userid = USERID()
>?
>
Awww... you spoiled it!  Wouldn't this bee more fun?:
    CALL SYSCALLS 'ON'
    ADDRES SYSCALL
    'getuid'
    'getpwuid' RETVAL 'PW.'
    USER = PW.PW_NAME

--
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to