View previous topic :: View next topic
|
Author |
Message |
prasannahcp
New User
Joined: 16 May 2005 Posts: 16 Location: Bangalore
|
|
|
|
Hi,
Can anybody tell me how to get the TSO USER NAME of a given TSO USERID |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I am certain that this has been asked before.
What were your search criteria ? |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
I saw Acevedo was online and give him the opportunity to be considered ( by me at least ) as the King of Data Areas .
I already helped me before. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Quote: |
I already helped me before. |
He already helped me before |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
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 .
I already helped me before. |
Ped... thanks for your kindly words but the KingS are Gilbert Saint Flour and Doug Nadel. ;) |
|
Back to top |
|
|
prasannahcp
New User
Joined: 16 May 2005 Posts: 16 Location: Bangalore
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
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 |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
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 |
|
|
|