× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There is an i5/OS API that validate a user id an password for the purpose of
being able to run jobs under different user ids.

Check out this link from the IBM site:

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/QSYGET
PH.htm

I'm don't have program source for you - but I suggest the following logic:

1. Create a prompt for user id and password.
2. Make sure that the user id doesn't start with '*' (see the link above)
3. Call the API (if you haven't called API's before, then check out the
examples from the IBM web site)
4. Check if any error returned from the call to the API.
5. If no errors, then the user login was good.

I'm not sure if this is the best method, but I think in the absence of other
suggestions, it might be a good place to start.

Question: If the user id entered is different than the one that you started
with, do you expect your job to continue under the new user id? If so, then
another API to check out is
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/QWTSET
P.htm This will take the 'handle' returned by QSYGETPH API and change the
current job's user id to the new user id.

At least, that's how I'm reading it. Let us know what you ended up with!

James


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Ashish Kulkarni
Sent: Sunday, March 23, 2008 9: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 with
him user id and ask him to enter his password,
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 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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.