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
 

 

Last logon vs last use

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Sun Nov 16, 2014 3:46 pm    Post subject: Last logon vs last use
Reply with quote

Is there a way to determine when someone has last logged on to the system, as opposed from the time they have last run a job? I was hoping that the LU command would be helpful here, but it seems that both LAST-ACCESS and LAST-CONNECT have the same timestamp.

I need a simple solution, not anything running jobs, as it needs to be incorporated in the logon exec.
Back to top
View user's profile Send private message

nevilh

Active User


Joined: 01 Sep 2006
Posts: 258

PostPosted: Sun Nov 16, 2014 6:59 pm    Post subject: Reply to: Last logon vs last use
Reply with quote

You might have a problem with this. By the time you get control RACF would have already updated the LAST-ACCESS and LAST-CONNECT fields.
You might be able to get round this by putting in a TSO Pre-Prompt exit but from the sound of your post this is not an option. Another option would be to allocate a Dummy RACF group for each user and to write a small routine that would connect to it at Logon time(depends on how many users and how friendly the RACF group are). Third option might be to store the date in a Variable
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Nov 18, 2014 2:04 am    Post subject: Reply to: Last logon vs last use
Reply with quote

Quote:
Third option might be to store the date in a Variable

I think the easiest is to store the date to a file. When you logon, read it, remind the user of last logon, then write a new date.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Nov 21, 2014 1:15 am    Post subject:
Reply with quote

Pedro have you looked at using the UPTUSER field. UPT though the protected step control block (PSCB)
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Nov 21, 2014 2:59 am    Post subject: Reply to: Last logon vs last use
Reply with quote

Mickey, it sounds fairly simple, but the original posters said:
Quote:
I need a simple solution,

and it is not clear if your solution is simple enough.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Nov 21, 2014 3:28 am    Post subject: Reply to: Last logon vs last use
Reply with quote

Along the same lines...

RACF provides a DATA field and also a CSDATA field. But you probably need special privileges to setup and use. This might be feasible for use site wide.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Nov 21, 2014 4:27 am    Post subject:
Reply with quote

PEDRO, This was a quick attempt I should be close on the offsets

TCB = STORAGE(D2X(540),4) /*PSATOLD IKJTCB */
JSCB = STORAGE(D2X(C2D(TCB)+180),4) /*TCBJSCB EZJSCB */
PSCB = STORAGE(C2X(D2C(JSCB+108)),4) /*JSPSCB IKJPSCB */
UPT = STORAGE(C2X(D2C(PSCB+34)),4) /*PSCBUPT IKJUPT */
UPTU = STORAGE(C2X(D2C(UPT+2)),4) /*UPTUSER FIELD */

ISRDDN

B UPT

CVT 10.? COMMUNICATIONS VECTOR TABLE
TCB CVT?? TASK CONTROL BLOCK
JSCB TCB+B4? JOB/STEP CONTROL BLOCK
PSCB JSCB+108? TSO PROTECTED STEP CONTROL BLOCK
UPT PSCB+34? USER PROFILE TABLE
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 51
Location: Switz

PostPosted: Fri Nov 21, 2014 12:48 pm    Post subject:
Reply with quote

"VPUT (date) PROFILE" ?
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Fri Nov 21, 2014 1:54 pm    Post subject:
Reply with quote

Code:
UPTUSER  DS    CL10     RESERVED FOR INSTALLATION USE
Is this data check pointed to RACF? I wrote a tiny command processor that lists its contents, and then stored the current date & time in it. I then logged off and logged back on, and reran the command processor. To my surprise, it appeared to show the date and time I save in it!

So the idea of using UPTUSER might work!
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Nov 21, 2014 8:05 pm    Post subject:
Reply with quote

Steve, I am not aware off RACF doing anything with the UPTUSER field.
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Fri Nov 21, 2014 9:20 pm    Post subject:
Reply with quote

Well, I wasn't either, though there is nothing to say it isn't saved. It is known parts of the UPT are preserved. I just did a quick and dirty test using a spare LOGON.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 21, 2014 10:13 pm    Post subject: Reply to: Last logon vs last use
Reply with quote

IMO worth looking at
http://publib.boulder.ibm.com/infocenter/ieduasst/stgv1r0/topic/com.ibm.iea.zos/zos/1.10/Security/IEA-V1R10-RACF-CustomFields.pdf
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Sat Nov 22, 2014 7:51 pm    Post subject:
Reply with quote

Mickeydusaor wrote:
PEDRO, This was a quick attempt I should be close on the offsets

TCB = STORAGE(D2X(540),4) /*PSATOLD IKJTCB */
JSCB = STORAGE(D2X(C2D(TCB)+180),4) /*TCBJSCB EZJSCB */
PSCB = STORAGE(C2X(D2C(JSCB+108)),4) /*JSPSCB IKJPSCB */
UPT = STORAGE(C2X(D2C(PSCB+34)),4) /*PSCBUPT IKJUPT */
UPTU = STORAGE(C2X(D2C(UPT+2)),4) /*UPTUSER FIELD */

Doesn't work,

Code:
     7 +++ PSCB = STORAGE(C2X(D2C(JSCB+108)),4) /*JSPSCB IKJPSCB */
IRX0041I Error running ERAPS, line 7: Bad arithmetic conversion

Not been able to figure out why. icon_sad.gif
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Sat Nov 22, 2014 10:16 pm    Post subject:
Reply with quote

Robert - try

PSCB = STORAGE(C2X(D2C(JSCB+264)),4) /*JSPSCB IKJPSCB */

264 = X'108'

Also

UPT = STORAGE(C2X(D2C(PSCB+52)),4) /*PSCBUPT IKJUPT */

52 = X'34'
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 258

PostPosted: Mon Nov 24, 2014 7:28 pm    Post subject: Reply to: Last logon vs last use
Reply with quote

If this code is to be used in production I personally would not use the UPTUSER. The UPTUSER is stored in the user Address Space and it is not unknown that this area is modified by user applications. A second drawback is that this field is only written to UADS/Racf at Logoff time. If the user does not Logoff cleanly it is a lottery if the data will be stored or not.
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Mon Nov 24, 2014 10:25 pm    Post subject: Re: Reply to: Last logon vs last use
Reply with quote

nevilh wrote:
If this code is to be used in production I personally would not use the UPTUSER. The UPTUSER is stored in the user Address Space and it is not unknown that this area is modified by user applications. A second drawback is that this field is only written to UADS/Racf at Logoff time. If the user does not Logoff cleanly it is a lottery if the data will be stored or not.
All too true. But other data in the UPT, such as the data set prefix, is saved with little apparent trouble. You counter this by extensive data validation. If the data isn't valid, you don't use it. Let's face it: last LOGON date / time is hardly vital!

A related problem is the area being used by another process. Here, again, you can establish controls.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TSO Logon Failing - Acount Not matching SLNewton TSO/ISPF 1 Thu Aug 25, 2016 9:37 pm
No new posts Execution of Macro at Command Line on... RahulG31 TSO/ISPF 9 Mon Dec 22, 2014 7:47 pm
No new posts How to define TCTUA / USERAREALEN for... Alan Playford CICS 3 Wed Nov 26, 2014 3:30 pm
No new posts SYSDSN fails on 3rd dataset during logon kdgillilan CLIST & REXX 1 Fri Oct 26, 2012 8:12 pm
No new posts REXX TSO Logon returns default panel Jo9675 CLIST & REXX 3 Wed Nov 23, 2011 9:48 pm


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