Profiles signing off - IBM AS400

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. ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Profiles signing off

  1. Profiles signing off

    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?

  2. Re: Profiles signing off

    Try an exit program: Is there has "Signoff Exit Point"

  3. Re: Profiles signing off

    On Sep 22, 10:34*am, 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?


    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.

  4. Re: Profiles signing off

    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?



  5. Re: Profiles signing off

    On Sep 22, 4:49*pm, eb wrote:
    > On Sep 22, 10:34*am, 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?

    >
    > 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

  6. Re: Profiles signing off

    On Sep 23, 5:28*am, Admin Rookie wrote:
    > On Sep 22, 4:49*pm, eb wrote:
    >
    >
    >
    > > On Sep 22, 10:34*am, 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?

    >
    > > 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

  7. Re: Profiles signing off

    On Sep 25, 4:51*am, eb wrote:
    > On Sep 23, 5:28*am, Admin Rookie wrote:
    >
    >
    >
    > > On Sep 22, 4:49*pm, eb wrote:

    >
    > > > On Sep 22, 10:34*am, 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 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

+ Reply to Thread