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



The key phrase for you to note in Vern's quote is, "No other attributes
associated with the user or group profile are replaced." I don't speak for
Scott, but I'm 100% convinced this is the reason he asked if you were
setting the library list by use of QIBM_CGI_LIBRARY_LIST environment
variable. Now, again, I'm not familiar with this thing you call
ServerUserID, but my guess is that it doesn't act like your understanding.

My experience with QWTSETP (admittedly not in CGI environment) tells me that
the effective User is changed, and library list is untouched. What you are
describing regarding job description takes place at job initialization time,
and - in this server job - job initialization is long since past. QWTSETP
does not reinitialize the job.

Again, how did you verify the change of library list via debug?

Here's a quick thing for you to do: Right after you change profiles, put in
a call to QCMDEXC. Pass the command "DSPLIBL" and a length of 7. Check the
job's output. You might also have a look at QSYS2/SYSFUNCS.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"The holy passion of friendship is so sweet and steady and loyal and
enduring in nature that it will last through a whole lifetime, if not asked
to lend money."
-- Mark Twain


My understanding of the ServerUserId, is that the profile we have it
being
changed to has a
job description associated to it, which when changed, changes the
library
list. We have done
Net.Data stuff for years (years ago), and then from there merged more
into
Java/Web development..
So, I haven't had to do much Apache config, in a while, except for
simple
JKMount, for java/war connections.
I may be wrong about the ServerUserId, but it makes sense.

I'll try taking the ServerUserId attribute out, to see if it is
confusing
the server. Hopefully your right about that.


How I was debugging was that I'd put the QTMH* job in STRSRVJOB mode,
then
STRDBG the program I was calling.
Then flip to another session to see the library list.


dav

David L. Mosley, Jr.


ServerUserID and UserID can make the HTTP server jobs run under users
other than the default QTMH* users. Swapping profiles is what is done.

I agree that the library list is not changed by swapping profiles -
here
is some info from the QWTSETP API doc -

The Set Profile Handle (OPM, QWTSETP; ILE, QsySetToProfileHandle) End
of
changeAPI validates the profile handle, locks the user profile, and
changes the current thread to run under the user and group profiles
represented by the profile handle. Once the change has been made, any
open files and objects allocated by the original profile are accessible
to the new profile.

No other attributes associated with the user or group profile are
replaced.

I suspect that the use of the environment variable along with swapping
profile is confusing the issue - the former is making the library list
change, the latter changes the user.

Now there is still the issue of finding stored procedures - and one of
the SQL manuals - I forget - discusses how these are found. It is not
always obvious, it seems.

Vern

On 8/28/2010 8:40 AM, Dennis Lovelady wrote:
I can debug it as see the Library List begin altered upon execution
(via
ServerUserId),
Care to elaborate on how you're debugging this? And to provide more
information about ServerUserId? From my experience, a change in
profile
does nothing to alter library list, so I'm confused. (You may have
your
own
"ServerUserId" routine that does this, which would be OK; it's not
something
I've seen.)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
Computers can figure out all kinds of problems, except the things in
the
world that just don't add up.



So, yeah, it appears that I have everything setup properly, and I am
executing my CGI program.
I can debug it as see the Library List begin altered upon exection
(via
ServerUserId),
And I am able to get properly execute my CLI programs and retrieve
data.
Except when there is a function in the SQL statement.

It's just not making sense.

Thanks, Scott
David



David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513

www.dancik.com



Scott Klement<rpg400-l@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/28/2010 12:32 AM
Please respond to
RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: RPG - CLI SQL problem. (Where's my stored functions)...






I seem to be missing part of the equasion, here... what does
Apache
have to do with it? Is this running in a CGI program?

Have you set the library list in Apache with SetEnv
QIBM_CGI_LIBRARY_LIST? Or... what do you mean by Apache is setting
the
library list? You said something about ServerUserId... I'm not
familiar
with that, but it sure sounds like the userid that the server runs
under
(and therefore, I don't understand what it has to do with a library
list.)


On 8/27/2010 10:42 PM, dmosley@xxxxxxxxxx wrote:
I am setting the "SQL_ATTR_DBC_SYS_NAMING" attribute, and it allows
me
to
access service programs
and execute normal SELECT sql statements, (as long as they don't
include
my functions).

My Apache config includes a ServerUserID, which (I thought) is
supposed
to
set the library list
when accessed.

It's just a odd mystery why this isn't working.

Thanks
David


David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513

www.dancik.com



Scott Klement<rpg400-l@xxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/27/2010 05:29 PM
Please respond to
RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: RPG - CLI SQL problem. (Where's my stored functions)...






hi David,

Are you setting SQL_ATTR_DBC_SYS_NAMING? If so, it'll use your
library
list to locate your functions (unless explicitly qualified)

Or are you using SQL naming? (If so, I it searches the SQL PATH.)

Make sure your *LIBL or PATH includes the functions that it can't
find.
(Not the programs behind them, but the actual functions.) Also, if
you're using a server job, make sure the *LIBL is set on the server
job
rather than on your local job.

HTH


On 8/27/2010 4:08 PM, dmosley@xxxxxxxxxx wrote:
I am performing SQL reads and fetches using the CLI SQL functions,
in
RPG.
Everything works wonderfully, except for the fact that it is have
the
worst time reading
my SQL stored functions. It keeps telling me not found. I know
that
that message can
be misleading, and yes, I have checked the signature of the
function
to
my
actual execution,
and they make.

I am connected via SQLConnect, using *LOCAL, and null user and
profile
(which to my understanding
will make the default job settings like library list default for
the
SQLConnect).

Any ideas would be greatly appreciated. Of course there are
always
work
arounds like not using
the CLI stuff (haha), but the structure that I have is very slick
and
very
dynamic, it would be a shame
to ugly it up just because stored functions won't work.

Thanks in advanced,
David

David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513

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