View previous topic :: View next topic |
Author |
Message |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Thu Dec 22, 2005 11:22 am Post subject: how to know the time a userid has logged on to TSO |
|
|
Hi All,
Is there any way to know the time in which a userid has logged in.In spool ,we can give PRE USERID* to see whether the userid is logged on / not . can we know the time and date when he has logged on to TSO ? _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Dec 22, 2005 11:29 am Post subject: |
|
|
Shekhar123,
You can look at the system log for finding the log on time. Search for IEF125I and you will find the time the user is logged on.
Code: |
IEF125I userid-LOGGED ON "-TIME=hh.mm.ss"
Explanation: In response to a MONITOR command with JOBNAMES or SESS in its operand, this message indicates that a user has logged on to the system under time sharing. If T is also specified in the command, then the time of day appears in the message. In the message text:
userid The user who logged on to the system.
hh.mm.ss The time given as the hour (00-23), the minute (00-59), and the
second (00-59).
System Action: The session enters allocation.
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Thu Dec 22, 2005 12:19 pm Post subject: |
|
|
Kolusu,
Can you please tell me how do i exactly look into the parameter IEF125I whether in spool or by any command ,if you highlight some more info it will be helpful ? _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Dec 22, 2005 12:33 pm Post subject: |
|
|
Quote: |
Kolusu,
Can you please tell me how do i exactly look into the parameter IEF125I whether in spool or by any command ,if you highlight some more info it will be helpful ?
|
From ISPF menu choose SDSF option. Then at the command prompt of SDSF type LOG. now you will enter the log screen . It will be huge so try to limit your search. Now at the command prompt type
and press enter.
Now you will find the latest user logged on . press PF5 repeatedly and you will find all other users
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Thu Dec 22, 2005 12:43 pm Post subject: |
|
|
Kolusu,
Wow, that was great knowing and it is a very useful command to know a lot of information.Amazing to see the results of the command.You are simply great. _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Dec 22, 2005 1:06 pm Post subject: |
|
|
You can also chase control blocks to find this information. Field ASCBINTS has the job start time in STCK format. To get the elapsed time, you just subtract the start time from the current time (64 bit arithmetic) and convert it to a readable form. This is best done in assembler because that is the easiest way to get the current time, but you can also steal a very recent STCK output from one the RMCT fields as shown in this post. Be sure to read the remainder of that thread though about intended programming interfaces (I don't think that ASCBINTS or RMCTTOC are intended interfaces).
The TASID program will show you a formatted elapsed time for all address spaces (jobs, tso, system, etc) using this method (STCK-ASCBINTS). |
|
Back to top |
|
 |
Ravi Beginner
Joined: 27 Jun 2005 Posts: 88 Topics: 2
|
Posted: Thu Dec 22, 2005 1:58 pm Post subject: |
|
|
If you type TSO TIME on the command line, it will display the current time as well as the session time. This session time indicates the # of hrs the user logged on.
TIME-01:55:35 PM. CPU-00:00:00 SERVICE-11111 SESSION-00:51:28 DECEMBER 22,2005.
You may scroll the information below UP, DOWN, LEFT, and/or RIGHT as needed
Code: | -------------------------------------------- V=IBM P=TSO/SYSHELP R=V3R3M0 I=TIME D=M
******************************** TOP OF DATA *********************************
FUNCTION -
THE TIME COMMAND INFORMS THE TERMINAL USER OF THE LOCAL TIME OF DAY,
THE DATE, CUMULATIVE CPU TIME, SERVICE UNITS, AND THE TOTAL TIME THE
THE USER HAS BEEN LOGGED ON THE TERMINAL DURING A SESSION.
SYNTAX -
TIME
OPERAND - NONE
REQUIRED - NONE
DEFAULTS - NONE
NOTE - ANYTHING IN THE OPERAND FIELD WILL BE IGNORED.
****************************** BOTTOM OF DATA ******************************** |
But this is gives the USER who Logged on.
Hope this helps. |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Thu Dec 22, 2005 2:24 pm Post subject: |
|
|
Ravi,
When i type in TSO TIME i get only the display like:
Code: |
TIME-01:55:35 PM. CPU-00:00:00 SERVICE-11111 SESSION-00:51:28 DECEMBER 22,2005.
|
I do not get any further info where in i can scroll up / down .Is there any way where in we can get more info to scroll up /down. _________________ Shekar
Grow Technically |
|
Back to top |
|
 |
Ravi Beginner
Joined: 27 Jun 2005 Posts: 88 Topics: 2
|
Posted: Thu Dec 22, 2005 2:36 pm Post subject: |
|
|
SESSION-00:51:28 THE TOTAL TIME THE USER HAS BEEN LOGGED ON THE TERMINAL DURING A SESSION.
i.e., 0 hrs 51 minutes 28 seconds the user has logged in.
If you want to see Other USERID's time, then Kolusu solution is the easiest.
In SDSF LOG you can see
IEF125I USERID - LOGGED ON
IEF126I USERID - LOGGED OFF
IEF450I USERID TSOlogon TSOlogon - ABEND=S522 U0000 REASON=00000000
So the difference will be Time of (IEF126I or IEF450I ) - IEF125I
Hope this helps |
|
Back to top |
|
 |
German Castillo Beginner

Joined: 23 Dec 2005 Posts: 83 Topics: 2 Location: Caracas, Venezuela
|
Posted: Fri Dec 23, 2005 3:57 pm Post subject: |
|
|
Hello!
Another way could be using SDSF in batch, like this, and select your prefered tso_userid:
Code: |
//SNAPSHOT EXEC PGM=SDSF
//ISFOUT DD SYSOUT=*
//OUTPUT DD DISP=(,PASS),DSN=YOUR.LOG,
// UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=133
//ISFIN DD *
OWNER *
DA OTSU
INPUT ON
PREFIX TSO_USERID
FIND 'TSO_USERID
++?
FIND 'JESMSGLG'
++S
PRINT FILE OUTPUT
PRINT 1 9999999
PRINT CLOSE
//*
|
Process the Output dataset with Rexx, icetool, cobol or whatever you want to, looking for the first ocurrence of "TSU", login time should be left of it _________________ Best wishes,
German Castillo |
|
Back to top |
|
 |
|
|