ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

validate userid & password QSYGETPH

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • validate userid & password QSYGETPH

    Code:
          *this api validates an as400 username and password:
         DWkUser           S             10A   inz('FLANARY')
         DWKPassword       S             10A   inz('HOGWASH')
         DProfileHandle    S             12A
         DPassWordLength   S             10i 0 inz(10)
         DCCSID            S             10i 0 inz(37)
         D*
         DQUSEC            DS
         D*                                             Qus EC
         D QUSBPRV                 1      4B 0
         D*                                             Bytes Provided
         D QUSBAVL                 5      8B 0
         D*                                             Bytes Available
         D QUSEI                   9     15
         D*                                             Exception Id
         D QUSERVED               16     16
         D*                                             Reserved
         D ERRC0100               17    274    Varying
    
         d error           S               n
    
         C*
         C                   Call      'QSYGETPH'
         C                   Parm                    WKUser
         C                   Parm                    WKPassword
         C                   Parm                    ProfileHandle
         C                   Parm                    QUSEC
         C                   Parm                    PasswordLength
         C                   Parm                    CCSID
         C*
         C                   If        QUSBAVL > 0
         C                   Eval      Error = *ON
         C                   Endif
         C*
         c                   eval      *inlr = *on
    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

  • #2
    Re: validate userid & password QSYGETPH

    That's great big guy! I wonder if there is a way to determine how many days until a password expires? Neither QSYGETPH or QWTSETP seem to cover this.

    Comment


    • #3
      Re: validate userid & password QSYGETPH

      Marty you salty old dog....How have you been?

      Your gonna have to call soon......"The Mrs." misses your voice

      **To the rest of ya... NUNYA!


      Take care
      Jamie
      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

      Comment


      • #4
        Re: validate userid & password QSYGETPH

        Originally posted by itp
        I wonder if there is a way to determine how many days until a password expires?
        Use the RTVUSRPRF command or the QSYRUSRI API.
        Philippe

        Comment

        Working...
        X