Page 1 of 1

Display users active time in system

Posted: Sun Aug 05, 2018 12:43 am
by himan
I want to display the user's total active time in system using syslogs for all the users present in the system .

What I did - i got all the system logs into a dataset and then from that dataset i want to retrive the line which are containing userids along with their time duration but while doing this the loop with that logic runs for a single time only.

here is the code -

"ALLOC F(DD1) DA("USERIDS") SHR"
"EXECIO * DISKR DD1 (STEM B."
"ALLOC F(DD2) DA("USERIDS1") SHR"
J=1;I=1
DO WHILE I<=B.0
IF(WORDPOS('LOGGED',B.I)=11) THEN
DO
C.J=B.I
SAY C.J
"EXECIO * DISKW DD2 (STEM C."
J=J+1
END
I=I+1
END


so help please