Results 1 to 9 of 9

Thread: Signed on users

  1. #1
    Experienced Forum Member Chevylover54's Avatar
    Join Date
    Apr 2005
    Location
    Byron, IL
    Age
    41
    Posts
    159
    Rep Power
    852

    Signed on users

    I'm not sure where this question should be asked so I will try here:

    Is there a way to get a list of signed on users. I know I can go to WRKACTJOB but is there anyway that I can get a cleaner list?
    Race Car spelled backwards is Race Car

  2. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Age
    21
    Posts
    1,000,000
     

  3. #2
    Driver of cars, eater of food jamief's Avatar
    Join Date
    Jan 2004
    Location
    Belvidere, IL - United States of America
    Age
    49
    Posts
    9,416
    Rep Power
    12605

    Re: Signed on users

    The answer is yes....I will locate some source for you tonight
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  4. #3
    Analyst Red's Avatar
    Join Date
    Mar 2005
    Location
    Ontario, Canada
    Posts
    391
    Rep Power
    1446

    Re: Signed on users

    Provided all your signed on users are in QINTER you can use the system command
    WRKSBSJOB SBS(QINTER) OUTPUT(*PRINT)

  5. #4
    Driver of cars, eater of food jamief's Avatar
    Join Date
    Jan 2004
    Location
    Belvidere, IL - United States of America
    Age
    49
    Posts
    9,416
    Rep Power
    12605

    Re: Signed on users

    You can but I do have an API example that list signed on users....
    I just dont remember where I put it


    I found it
    Code:
              F****************************************************************
         F* OBJECT ID: USERS
         F* TEXT:      DISPLAY USER ACTIVITY
         F* Jun 28/03  S.R.Pascas
         F****************************************************************
        DD GeneralDs       DS
         D  InputSize            113    116B 0
         D  ListOffset           125    128B 0
         D  ListNbr              133    136B 0
         D  EntrySize            137    140B 0
         D InputDs         DS
         D  UserSpace                    20
         D ErrorDs         DS                  INZ
         D  BytesProvd             1      4B 0 INZ(116)
         D  BytesAvail             5      8B 0
         D  MessageId              9     15
         D  Err###                16     16
         D  MessageDta            17    116
         D                 DS                  INZ
         D  StartPosit             1      4B 0
         D  StartLen               5      8B 0
         D  SpaceLen               9     12B 0
         D  NbrEntries            29     32B 0
         D  LenEntry              37     40B 0
         D  NbrReturn             41     44B 0
         D  MaxEntries            45     48B 0
         d Mydata          s             25
         D SpaceAtrib      S             10
         D SpaceValue      S              1
         D SpaceAuth       S             10
         D SpaceText       S             50
         D SpaceReplc      S             10
         D FormatName      S              8
         D USERNAME        S             10    INZ('*ALL      ')
         D DSPSTATION      S             10    INZ('*ALL      ')
         D DISCONNECT      S             10    INZ('*NO       ')
         D SIGNEDOFF       S             10    INZ('*NO       ')
         D******************************************************************
         D*Structure for SGNU0200 format
         D******************************************************************
         DQEZU0200         DS
         D*                                             Qez SGNU0200
         D  QEZDSN00               1     10
         D*                                             Display Station Name
         D  QEZUN01               11     20
         D*                                             User Name
         D  QEZJNBR00             21     26
         D*                                             Job Number
         D  QEZIVITY00            27     36
         D*                                             Activity
         D  QEZAN00               37     46
         D*                                             Activity Name
         D  QEZDJ00               47     47
         D*                                             Disconnect Job
         D  QEZERVED00            48     64
         D*                                             Reserved
         D QEZDSD                 65    114
         D*                                             Display Station Description
         D QEZUD                 115    164
         D*                                             User Description
    
         d*  Error code data
         D ErrData         DS
         D   BytesProv             1      4B 0 Inz( 272 )
         D   BytesAval             5      8B 0
         D   ExcpId                9     15A
         D   Reserved             16     16A
         D   ExcpData             17    272A
         d*
         D STRING          S             71
         D ARRAY           s             71    DIM(1000)
    
         C                   EVAL      UserSpace = ('USERS     QTEMP')
          *  Create user space
         C                   CALL      'QUSCRTUS'
         C                   PARM                    UserSpace
         C                   PARM      *BLANKS       SpaceAtrib
         C                   PARM      2048          SpaceLen
         C                   PARM      *BLANKS       SpaceValue
         C                   PARM      '*CHANGE'     SpaceAuth
         C                   PARM      *BLANKS       SpaceText
         C                   PARM      '*YES'        SpaceReplc
         C                   PARM                    ErrorDs
          *
         C                   z-add     0             signedon          5 0
          *  List all objects in file
         C                   EVAL      UserSpace = ('USERS     QTEMP')
         C                   CALL      'QEZLSGNU'
         C                   PARM                    UserSpace
         C                   PARM      'SGNU0200'    FormatName
         C                   PARM                    USERNAME
         C                   PARM                    DSPSTATION
         C                   PARM                    DISCONNECT
         C                   PARM                    SIGNEDOFF
         C                   PARM                    ErrorDs
         C                   EVAL      StartPosit = 1
         C                   EVAL      StartLen = 140
          *  Retrieve user space general information
         C                   EVAL      UserSpace = ('USERS     QTEMP')
         C                   CALL      'QUSRTVUS'
         C                   PARM                    UserSpace
         C                   PARM                    StartPosit
         C                   PARM                    StartLen
         C                   PARM                    GeneralDs
          *  Retrieve the list by walking through the user space
         C                   EVAL      StartPosit =  1
         C                   EVAL      StartLen = inputsize
         C                   EVAL      UserSpace = ('USERS     QTEMP')
         C                   CALL      'QUSRTVUS'
         C                   PARM                    UserSpace
         C                   PARM                    StartPosit
         C                   PARM                    StartLen
         C                   PARM                    inputds
         C                   EVAL      StartPosit = ListOffset + 1
         C                   EVAL      StartLen = EntrySize
          *  Retrieve the list by walking through the user space
         C                   Z-ADD     0             INDX              4 0
          *
         C     listnbr       ifgt      0
         C                   DO        ListNbr
         C                   EVAL      UserSpace = ('USERS     QTEMP')
         C                   CALL      'QUSRTVUS'
         C                   PARM                    UserSpace
         C                   PARM                    StartPosit
         C                   PARM                    StartLen
         C                   PARM                    Qezu0200
         C                   EVAL      StartPosit = StartPosit + EntrySize
          *
          *
         c                   eval      mydata = qezun01 + Qezdsn00
         c     mydata        dsply                   reply             1
          *
         c                   enddo
         C                   endif
         c                   eval      *INLR = *on
    Attached Files Attached Files
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  6. #5
    Experienced Forum Member Chevylover54's Avatar
    Join Date
    Apr 2005
    Location
    Byron, IL
    Age
    41
    Posts
    159
    Rep Power
    852

    Re: Signed on users

    Is there anyway I can get WRKSBSJOB SBS(QINTER) OUTPUT(*PRINT) to dump to a file?
    Race Car spelled backwards is Race Car

  7. #6
    Registered User jimmyoctane's Avatar
    Join Date
    Jan 2004
    Location
    Illinois
    Posts
    210
    Rep Power
    0

    Re: Signed on users

    just use the above API and replace

    Code:
      c     mydata        dsply                   reply             1
    the above line with a WRITE to a file you create.


    JImmy

  8. #7
    Experienced Forum Member Chevylover54's Avatar
    Join Date
    Apr 2005
    Location
    Byron, IL
    Age
    41
    Posts
    159
    Rep Power
    852

    Re: Signed on users

    Before I make any changes, is this what the API is supposed to do?

    Display Program Messages

    DSPLY SUSZEKB QPADEV0021
    *N
    DSPLY IGNACIB QPADEV0029
    *N
    DSPLY SHAMASA QPADEV0011
    *N
    DSPLY ANDERSV QPADEV0024
    *N
    DSPLY ASCHENT QPADEV0031
    *N
    DSPLY SUSZEKB QPADEV0023
    *N
    DSPLY ANDERSV QPADEV0030
    *N
    DSPLY SWOPSPT QPADEV0006

    Type reply, press Enter.
    Reply . . .
    Race Car spelled backwards is Race Car

  9. #8
    Registered User jimmyoctane's Avatar
    Join Date
    Jan 2004
    Location
    Illinois
    Posts
    210
    Rep Power
    0

    Re: Signed on users

    Thos are just a couple of the fields returned from the API its the user id and the device they are signed on.

  10. #9
    Code400 Newbie
    Join Date
    Feb 2006
    Location
    Delhi
    Posts
    2
    Rep Power
    0

    Smile Re: Signed on users

    Quote Originally Posted by Chevylover54
    Is there anyway I can get WRKSBSJOB SBS(QINTER) OUTPUT(*PRINT) to dump to a file?
    What you can do is: Locate the spool file through WRKSPLF and went through the spool file where your data has been copied. Now run command, CPYSPLF and mention the name of sppol file in it and PF where u want to copy the whole data. Now your data has been copied into SPLF. Wht you can do now is use of substring operation in RPG and retrieve/save all the user information in other PF and use accordingly. I would suggest you to make CLP for whole proceedure.

  11. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

Facebook Comments


Similar Threads

  1. how can I force to signed numeric
    By jamief in forum SQL
    Replies: 10
    Last Post: January 16th, 2008, 09:24 AM
  2. Display another users screen
    By GLS400 in forum Iseries Tools
    Replies: 6
    Last Post: February 27th, 2007, 07:36 PM
  3. Active Users
    By Sean2381 in forum RPG/RPGLE
    Replies: 1
    Last Post: February 27th, 2006, 07:34 AM
  4. CPYF failed because of signed vs. packed
    By jamief in forum Tips for the Iseries/AS400
    Replies: 1
    Last Post: November 7th, 2005, 11:04 AM
  5. Users accessing a file
    By Chevylover54 in forum AS400 REPORTS
    Replies: 2
    Last Post: June 21st, 2005, 12:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •