|
The program will still work for you. If you're going to validate the
password, you're going to have to send it the user id you're validating
for. If you already know the ID, you don't have to ask for it.
______________________________________________________________________________________________
Randy Kesterson, Information Services
Market Transport Services - a UTi Worldwide Company| 110 N Marine Drive |
Portland, OR 97217 | USA
rpkesterson@xxxxxxxxxxxxxxxxxxx | D +1 503.978.4353 | O +1 503.283.2405x353 | F +1
503.978.4392
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Ashish Kulkarni
Sent: Monday, March 24, 2008 7:06 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Authenticate As400 user id password
Hi
Thanks for your reply, i have an application where in i need to validate
password when user is doing some thing important, as this will be noted as
his digital signature,
So i really dont need user id, as i already know the user id, just ask him
to enter his password and validate it, if it is valid move on else give
error.
But this 'QSYGETPH' is also cool, and will use it in a different project
where i need the user to enter his user id, password
Ashish
On 3/24/08, Kesterson, Randy <RPKesterson@xxxxxxxxxxxxxxxxxxx> wrote:
to
I just had to write one. Here's a copy of the source:
*IS911R4 - THIS API VALIDATES AN AS400 USERNAME AND PASSWORD:
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
C *ENTRY PLIST
C PARM P0RTN 7
C PARM WKUSER 10
C PARM WKPASSWORD 10
C
C CLEAR P0RTN
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 P0RTN = 'BAD'
C ENDIF
C
C CALL 'IS911R5'
C PARM PROFILEHANDLE
C
C EVAL *INLR = *ON
Just pass the program the user id and password fields and if the return
code comes back as BAD, the profile or password is invalid. The source
IS911R5 follows. It's use to release the Profile Handle. I'm not surewhy
you have to do this, but IBM recommends you do.______________________________________________________________________________________________
*IS911R5 - THIS API VALIDATES AN AS400 USERNAME AND PASSWORD:
DPROFILEHANDLE S 12A
C**********************************************************************
C
C *ENTRY PLIST
C PARM PROFILEHANDLE
C
C CALL 'QSYRLSPH'
C PARM PROFILEHANDLE
C
C EVAL *INLR = *ON
That's it.
|
Randy Kesterson, Information Services
Market Transport Services - a UTi Worldwide Company| 110 N Marine Drive
Portland, OR 97217 | USA
rpkesterson@xxxxxxxxxxxxxxxxxxx | D +1 503.978.4353 | O +1503.283.2405x353 | F +1
503.978.4392rpg400-l-bounces@xxxxxxxxxxxx]
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:
On Behalf Of Ashish Kulkarniwith
Sent: Sunday, March 23, 2008 6:44 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: Authenticate As400 user id password
Hi
I have a requirement where in i have to show a user a window on AS400
him user id and ask him to enter his password,list
then authenticate to see if the password is valid,
I have to do it using RPGLE or CL any ideas how to do it.
can i have any sample program to do so
Ashish
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxxlist
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.