Hi Ewart,

if it is only a question of processing different files in different
libraries with SQL from
RPGLE you can just define the library in the select FROM MYLIBXXX/MYTABLE
statement in a dynamic build SQL statement.

Setting library list in every call is no big deal, in fact Apache does it in
every
call if you use the SETENV QIBM_CGI_LIBRARY_LIST in Apache.

But setting another library list isn't enough if you use standard RPG DB I/O
and leave CGI programs active - then you also have to "open/read/close" in
every program call - or if you use Activation Groups you need a main program
that handles the activation group reclaim before executing the underlying
programs
- and that is a "performance killer" and also complicates things.

The nice thing about SQL is that it actually leaves files open on the job
(assuming
that the job may need the same ODP again) this even if you close the cursor
in the
program.



On Fri, Apr 22, 2011 at 5:33 AM, <ewart.desouza@xxxxxxxxxxx> wrote:

Thanks guys for all the suggestions,

Yes my question was more related to how to go about setting the library
list, not the actual command itself.

Kevin's suggestion of activation group & data queues may be more efficient
but 'complex'. I think I would go with two radio button sets (since Scott
too finds it OK) & store the selection in cookies(yet to try) so the user
need to make a selection only once.

I'll give it a try, I only feel retrieving the cookies & setting the
library list for every call may cause a bit of a performance issue.

I don't want to start a debate, but because it makes
paging/selection/sorting easier I plan to use SQL in RPG & for the first
time I am also going to try using a view of a view of a view..... People
say SQL is very fast but I think this too will cause a performance issue
as the views are built at run time i.e. each time a page is to be
displayed on the screen. Here too suggestions are welcome - maybe I should
start this in another thread ??

Thanks once again
BR
Ewart



Scott Klement

From:
Scott Klement <web400@xxxxxxxxxxxxxxxx>


To:
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


Cc:



Date:
04/21/2011 11:05 PM


Subject:
Re: [WEB400] Library list in CGIDEV2



hello Ewart,

I've done this using the usropn function in RPG but I plan to use SQL.
So
I feel it would be easier to use the CHGLIBL command to set the library
list before using any SQL command. The problem is how ??

To use the CHGLIBL command, just do:

CHGLIBL LIBL(LIB1 LIB2 LIB3 .. etc)

Is that really what you're asking? Or are you asking us where to store
the library lists for each database environment? Or...?


After the login screen I plan to have another screen where the various
product areas are listed (using Radio buttons)& the various
applications
are listed (in the form of links / Radio buttons, which is better ??).
The
user will then have to select any one product area& an application to
proceed. Is this a good way of doing it ??

I would use radio buttons if you want the "product area" and
"application" to be submitted together. A link would be more appropriate
if you want to go to the application without submitting anything else on
the page long with it.

(At least... that's what a user would expect.)

It seems like an okay method to me -- but it's really hard to say
whether it's a good design without being familiar with the application.
What's important here is that it's easy for the user to understand,
use, and not cumbersome to repeat (if repetition is necessary.)
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




This e-mail is confidential and it is intended only for the addressees. Any
review, dissemination, distribution, or copying of this message by persons
or entities other than the intended recipient is prohibited. If you have
received this e-mail in error, kindly notify us immediately by telephone or
e-mail and delete the message from your system. The sender does not accept
liability for any errors or omissions in the contents of this message which
may arise as a result of the e-mail transmission.

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





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.