Try an exit program: Is there has "Signoff Exit Point"
This is a discussion on Profiles signing off - IBM AS400 ; Hi, I'm looking for a way to see when a user has logged off the system. I know that some info can be gained by using DSPLOG but it's hard to see as it records every job the user does. ...
Hi,
I'm looking for a way to see when a user has logged off the system. I
know that some info can be gained by using DSPLOG but it's hard to see
as it records every job the user does. In this instance the user is an
Warehouse RF gun user and every time they finish a pick it records it.
The log therefore is huge and hunting down particular users is time
consuming.
Is there an alternative? Perhaps in the WRKUSRPRF command?
Try an exit program: Is there has "Signoff Exit Point"
On Sep 22, 10:34*am, Admin Rookiewrote:
> Hi,
>
> I'm looking for a way to see when a user has logged off the system. I
> know that some info can be gained by using DSPLOG but it's hard to see
> as it records every job the user does. In this instance the user is an
> Warehouse RF gun user and every time they finish a pick it records it.
> The log therefore is huge and hunting down particular users is time
> consuming.
>
> Is there an alternative? Perhaps in the WRKUSRPRF command?
I once wrote my own Signoff procedure. It uses the QUSRJOBI API to
gather information about the session and log some data. I can give you
the RPG source, if you like.
But the user has to signoff, if they just turn off a terminal or the
power fails. The code doesn't run.
Hi,
ILE Exit Handler CEE4RAGE could do this for you.
D*B
Admin Rookie wrote:
> Hi,
>
> I'm looking for a way to see when a user has logged off the system. I
> know that some info can be gained by using DSPLOG but it's hard to see
> as it records every job the user does. In this instance the user is an
> Warehouse RF gun user and every time they finish a pick it records it.
> The log therefore is huge and hunting down particular users is time
> consuming.
>
> Is there an alternative? Perhaps in the WRKUSRPRF command?
On Sep 22, 4:49*pm, ebwrote:
> On Sep 22, 10:34*am, Admin Rookiewrote:
>
> > Hi,
>
> > I'm looking for a way to see when a user has logged off the system. I
> > know that some info can be gained by using DSPLOG but it's hard to see
> > as it records every job the user does. In this instance the user is an
> > Warehouse RF gun user and every time they finish a pick it records it.
> > The log therefore is huge and hunting down particular users is time
> > consuming.
>
> > Is there an alternative? Perhaps in the WRKUSRPRF command?
>
> I once wrote my own Signoff procedure. It uses the QUSRJOBI API to
> gather information about the session and log some data. I can give you
> the RPG source, if you like.
>
> But the user has to signoff, if they just turn off a terminal or the
> power fails. The code doesn't run.
Hi, that would be great. I'm not familiar with the QUSRJOBI API.
Kind Regards
On Sep 23, 5:28*am, Admin Rookiewrote:
> On Sep 22, 4:49*pm, ebwrote:
>
>
>
> > On Sep 22, 10:34*am, Admin Rookiewrote:
>
> > > Hi,
>
> > > I'm looking for a way to see when a user has logged off the system. I
> > > know that some info can be gained by using DSPLOG but it's hard to see
> > > as it records every job the user does. In this instance the user is an
> > > Warehouse RF gun user and every time they finish a pick it records it..
> > > The log therefore is huge and hunting down particular users is time
> > > consuming.
>
> > > Is there an alternative? Perhaps in the WRKUSRPRF command?
>
> > I once wrote my own Signoff procedure. It uses the QUSRJOBI API to
> > gather information about the session and log some data. I can give you
> > the RPG source, if you like.
>
> > But the user has to signoff, if they just turn off a terminal or the
> > power fails. The code doesn't run.
>
> Hi, that would be great. I'm not familiar with the QUSRJOBI API.
>
> Kind Regards
Actually to capture just Signoff date/time you don't need to use the
API
Created a new SIGNOFF command to call a custom MYSIGNOFFC pgm, then
place it in a library higher than QSYS in the library list.
Or if the user has a signoff menu option, then just change the menu
option to call your MYSIGNOFFC
SIGNOFF: CMD PROMPT('Sign Off')
PARM KWD(LOG) TYPE(*CHAR) LEN(7) DFT(*LIST)
PARM KWD(DROP) TYPE(*CHAR) LEN(4) DFT(*DEVD)
PARM KWD(ENDCNN) TYPE(*CHAR) LEN(6) DFT(*NO)
CRTCMD CMD(some_higher_library/SIGNOFF) PGM(MYLIB/MYSIGNOFFC)
SRCFILE(MYLIB/QCMDSRC)
SRCMBR(SIGNOFF) REPLACE(*NO)
/* ************************************************** *************
*/
/* MYSIGNOFFC
*/
/* ************************************************** *************
*/
PGM
CALL PGM(MYSIGNOFFR)
QSYS/SIGNOFF
ENDPGM
************************************************** ***************
* MYSIGNOFFR PROGRAM *
************************************************** ***************
FLOGFILE UF A E K DISK
**
D
SDS
D PROGRM
*PROC
D USER 254
263
**
**
D SIGNOFF_DATE S D DATFMT(*ISO)
INZ(*SYS)
D SIGNOFF_TIME S D TIMFMT(*HMS)
INZ(*SYS)
************************************************** ***************
/Free
// USER is would be the User Profile Name
// SIGNOFF_DATE and SIGNOFF_TIME is the current system time, which
would be the signing off date and time
Chain User Logfile;
If not(%found(Logfile));
LogUser = User;
LogDate = %char(Signoff_date: *usa);
LogTime = %char(Signoff_time: *hms);
Else;
LogDate = %char(Signoff_date: *usa);
LogTime = %char(Signoff_time: *hms);
Update Logfile %fields(LogDate: LogTime);
Endif;
*inLR = *on;
/End-Free
On Sep 25, 4:51*am, ebwrote:
> On Sep 23, 5:28*am, Admin Rookiewrote:
>
>
>
> > On Sep 22, 4:49*pm, ebwrote:
>
> > > On Sep 22, 10:34*am, Admin Rookiewrote:
>
> > > > Hi,
>
> > > > I'm looking for a way to see when a user has logged off the system.I
> > > > know that some info can be gained by using DSPLOG but it's hard to see
> > > > as it records every job the user does. In this instance the user isan
> > > > Warehouse RF gun user and every time they finish a pick it records it.
> > > > The log therefore is huge and hunting down particular users is time
> > > > consuming.
>
> > > > Is there an alternative? Perhaps in the WRKUSRPRF command?
>
> > > I once wrote my own Signoff procedure. It uses the QUSRJOBI API to
> > > gather information about the session and log some data. I can give you
> > > the RPG source, if you like.
>
> > > But the user has to signoff, if they just turn off a terminal or the
> > > power fails. The code doesn't run.
>
> > Hi, that would be great. I'm not familiar with the QUSRJOBI API.
>
> > Kind Regards
>
> Actually to capture just Signoff date/time you don't need to use the
> API
>
> Created a new SIGNOFF command to call a custom MYSIGNOFFC pgm, then
> place it in a library higher than QSYS in the library list.
> Or if the user has a signoff menu option, then just change the menu
> option to call your MYSIGNOFFC
>
> SIGNOFF: * *CMD * * * *PROMPT('Sign Off')
> * * * * * * PARM * * * KWD(LOG) TYPE(*CHAR) LEN(7) DFT(*LIST)
> * * * * * * PARM * * * KWD(DROP) TYPE(*CHAR) LEN(4) DFT(*DEVD)
> * * * * * * PARM * * * KWD(ENDCNN) TYPE(*CHAR) LEN(6) DFT(*NO)
>
> CRTCMD CMD(some_higher_library/SIGNOFF) PGM(MYLIB/MYSIGNOFFC)
> * * * *SRCFILE(MYLIB/QCMDSRC)
> * * * *SRCMBR(SIGNOFF) REPLACE(*NO)
>
> /* ************************************************** *************
> */
> /* MYSIGNOFFC
> */
> /* ************************************************** *************
> */
> * * * * * * *PGM
>
> * * * * * * *CALL * PGM(MYSIGNOFFR)
>
> * * * * * * *QSYS/SIGNOFF
>
> ENDPGM
>
> ************************************************** ***************
> ** MYSIGNOFFR *PROGRAM * * * * * * * * * * * * * * * * * * **
>
> ************************************************** ***************
> *FLOGFILE * UF A E * * * * * K DISK
> ***
> D
> SDS
> D *PROGRM
> *PROC
> D *USER * * * * * * * *254
> 263
>
> **
>
> **
> D SIGNOFF_DATE * *S * * * * * * * D * DATFMT(*ISO)
> INZ(*SYS)
> D SIGNOFF_TIME * * S * * * * * * * D * TIMFMT(*HMS)
> INZ(*SYS)
>
> ************************************************** ***************
> /Free
>
> // USER is would be the User Profile Name
> // SIGNOFF_DATE and SIGNOFF_TIME is the current system time, which
> would be the signing off date and time
>
> Chain User Logfile;
> If not(%found(Logfile));
> * LogUser = User;
> * LogDate = %char(Signoff_date: *usa);
> * LogTime = %char(Signoff_time: *hms);
> Else;
> * LogDate = %char(Signoff_date: *usa);
> * LogTime = %char(Signoff_time: *hms);
> * Update Logfile %fields(LogDate: LogTime);
> Endif;
>
> *inLR = *on;
>
> /End-Free
Hi,
This is great. I'll look into this.
Cheers
AR