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



A description of all IBM i and DB2 for I Services provided by IBM can be
found in the IBM Knowledge Center:
IBM i Services :
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzajq/rzajqservic
essys.htm?lang=de
DB2 for I Services:
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzajq/rzajqservic
esdb2.htm?lang=de


Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"


-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Dave
Boettcher
Gesendet: Thursday, 08.10 2015 18:02
An: RPG programming on the IBM i (AS/400 and iSeries)
Betreff: RE: AW: Retrieve a user's full name (not the User ID)

I'm trying this out in interactive SQL and can't seem to find the
qsys2/users table. Is it only available for embedded SQL?
Quite often I need to search if an employee has an ID on the IBM i and this
could be handy. Right now we create a file of user profiles each week but if
this file is there it would work too.
Right now I use a statement like this on our file of users:
SELECT * FROM qgpl/userfile WHERE upper(uptext) like '%DAVE%'

Any questions, let me know please.

Thanks,

Dave B

Everybody is ignorant, only on different subjects. - Will Rogers


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
darren@xxxxxxxxx
Sent: Thursday, October 08, 2015 10:27 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
<rpg400-l@xxxxxxxxxxxx>
Subject: Re: AW: Retrieve a user's full name (not the User ID)

I was amazed by this function, but confused because I hadn't seen it before.
I went looking for it in a reference chart I have from IBM online, and I
didn't find this table function, but I did find the QSYS2.USER_INFO view.
This view seems more restrictive by my authority to this data, possibly
because there are a lot of fields in there. This QSYS2.USER() table
function returns more results, possibly because the name of the user isn't
subject to tight profile controls. I find that interesting.

IBM Provided an UDTF (User Defined Function) named USERS(), located
within
the QSYS2 library.
You easily can access this UDTF with (embedded) SQL:

Exec SQL Select ODOBTX into :HostVariable
from Table(Qsys2.Users()) x
Where ODOBNM = :HostUsrPrf;



--
This is the RPG programming on the IBM i (AS/400 and 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 ...


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.