Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To get USER name of a given user ID

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
prasannahcp

New User


Joined: 16 May 2005
Posts: 15
Location: Bangalore

PostPosted: Fri Nov 16, 2007 12:33 pm    Post subject: To get USER name of a given user ID
Reply with quote

Hi,

Can anybody tell me how to get the TSO USER NAME of a given TSO USERID
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Nov 16, 2007 1:29 pm    Post subject:
Reply with quote

I am certain that this has been asked before.

What were your search criteria ?
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Nov 16, 2007 3:52 pm    Post subject:
Reply with quote

Just vague answer :

That information is kept in RACF and I am not sure ( outside RACF ) you can access the User Name on another TSO from your TSO session. Your own, you can via data areas.

Am I right ? not sure !
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Nov 16, 2007 4:15 pm    Post subject:
Reply with quote

Yes you're right:
Quote:

/* nombre del usuario */
ascb = storage(224,4) /* psaaold */
asxb = storage(d2x(c2d(ascb)+108),4) /* ascbasxb */
acee = storage(d2x(c2d(asxb)+200),4) /* acee */
unam = storage(d2x(c2d(acee)+100),4) /* aceeunam */
user_name=strip(storage(d2x(c2d(unam)+1),24))
say user_name
exit
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Nov 16, 2007 4:16 pm    Post subject:
Reply with quote

better using code than quote :


Code:

/* nombre del usuario        */                                   
 ascb = storage(224,4)                             /* psaaold  */
 asxb = storage(d2x(c2d(ascb)+108),4)              /* ascbasxb */
 acee = storage(d2x(c2d(asxb)+200),4)              /* acee     */
 unam = storage(d2x(c2d(acee)+100),4)              /* aceeunam */
 user_name=strip(storage(d2x(c2d(unam)+1),24))                   
 say user_name                                                   
 exit                                                             


;)
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Nov 16, 2007 4:19 pm    Post subject:
Reply with quote

I saw Acevedo was online and give him the opportunity to be considered ( by me at least ) as the King of Data Areas . icon_biggrin.gif
I already helped me before.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Nov 16, 2007 4:21 pm    Post subject:
Reply with quote

Quote:
I already helped me before.


He already helped me before
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Nov 16, 2007 5:30 pm    Post subject:
Reply with quote

PeD wrote:
I saw Acevedo was online and give him the opportunity to be considered ( by me at least ) as the King of Data Areas . icon_biggrin.gif
I already helped me before.


Ped... thanks for your kindly words but the KingS are Gilbert Saint Flour and Doug Nadel. ;)
Back to top
View user's profile Send private message
prasannahcp

New User


Joined: 16 May 2005
Posts: 15
Location: Bangalore

PostPosted: Mon Nov 19, 2007 2:47 pm    Post subject: Reply to: To get USER name of a given user ID
Reply with quote

The above code works well but it gives the user name of the current login user ID. I need the USER NAME of a given USER ID of all the users.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Mon Nov 19, 2007 3:08 pm    Post subject:
Reply with quote

That is what we told you.
Only your own USER name , or for the others, via RACF or via a inhouse file which contains such info ( here we have that kind of file ).

regards
Pierre
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Mon Nov 19, 2007 7:59 pm    Post subject: Reply to: To get USER name of a given user ID
Reply with quote

The RACF database may be unloaded (by your security area) or if you can get READ access. Once unloaded, the 0200 records may be selected off. The VB file will consist of all the "user" records and will have their name and userid:

Code:

//STEP010  EXEC PGM=IRRDBU00,REGION=48M,PARM=NOLOCKINPUT             
//SYSPRINT DD SYSOUT=*                                               
//INDD1 DD  DISP=SHR,                                                 
//          DSN=RACF.DATABASE                                       
//OUTDD DD  DSN=HLQ.RACF.BACKUP,                             
//          DISP=(NEW,CATLG,DELETE),                                 
//          UNIT=SYSDA,SPACE=(CYL,(650,50),RLSE),             
//          DCB=(RECFM=VB,LRECL=4096,BLKSIZE=20480)                   
//****************************************************************** 
//ST0200 EXEC PGM=SORT                                               
//SORTIN   DD DSN=HLQ.RACF.BACKUP,DISP=SHR                   
//SORTOUT  DD DSN=HLQ.RACF.SEL200,                         
//          DISP=(NEW,CATLG,DELETE),                                 
//          UNIT=SYSDA,SPACE=(TRK,(50,15),RLSE),               
//          DCB=(RECFM=VB,LRECL=4096,BLKSIZE=20480)                   
//SYSOUT   DD SYSOUT=*                                               
//SYSIN    DD *                                                       
 SORT FIELDS=COPY                                                     
 INCLUDE COND=(5,4,CH,EQ,C'0200')
/*                                   
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT - E15 and E35 using same user ex... Abhi Nature DFSORT/ICETOOL 12 Mon Oct 03, 2016 4:33 pm
No new posts User exit in COBOL programs ganasrinivasan PL/I & Assembler 0 Thu Aug 18, 2016 12:48 pm
No new posts Data set is allocated to another job ... Seppe CLIST & REXX 2 Wed Aug 03, 2016 4:31 pm
No new posts user abend 4038 occurred in module CE... Musab Ahmed PL/I & Assembler 1 Wed Mar 30, 2016 10:49 am
No new posts IP address of user's machine shreya19 TSO/ISPF 5 Wed Mar 16, 2016 3:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us