×
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.
Hi Terry,
Typically you'd set up your httpd.conf with something like this:
<Location /diva>
SetEnv QIBM_CGI_LIBRARY_LIST "QGPL;MYFILESA;MYPGMSA;QTEMP"
</Location>
<Location /divb>
SetEnv QIBM_CGI_LIBRARY_LIST "QGPL;MYFILESB;MYPGMSB;QTEMP"
</Location>
When the user connects to a URL as
http://example.com/diva, he'll have
MYFILESA and MYPGMSA in his library list. When the URL ends in /divb,
it'll be MYFILESB and MYPGMSB instead.
It may end up using the same CGI instance -- but the library list of the
instance will be changed before the CGI program is called. This means
that the program must close it's files and re-open them based on this
URL changing, otherwise it could retain the previously opened files
which might be in the wrong library. Not sure if you normally keep
files open or closed, so this might or might not apply to you.
You may want to also include directives like this:
<Location /divb>
Require valid-user
PasswdFile %%SYSTEM%%
UserID %%CLIENT%%
AuthType Basic
AuthName "Div B Sign On"
SetEnv QIBM_CGI_LIBRARY_LIST "QGPL;MYFILESB;MYPGMSB;QTEMP"
</Location>
The Auth stuff means that the user needs to sign on with their System i
userid & password. The "UserID %%CLIENT%%" tells the system that the
jobs run run with the signed on user's authority -- which also has the
side-effect that a separate CGI instance (which is what I assume you
mean by QZSRCGI instance) is created for each user who signs on.
Different userids will get different instances.
If your users don't use multiple divisions, this may help you leave the
files open if you want them open, or at least reduce the frequency that
you have to open or close them.
There are environment variables that are passed to your program that can
be used to determine which instance you're currently in (in case your
program needs to know that in order to open/close files for example). I
don't remember what they are off the top of my head, but if you dump the
variables for the CGI instance, you should be able to see which ones
make a difference.
Terry Anderson wrote:
Greetings List,
I have an application using CGIDEV2 that will be used by multiple
divisions. Each division has its own set of data libs so in order to
read and write data to and from the i5 for that division, I need to
add two libs to the *LIBL. Today while testing I signed on as
division A. The QZSRCGI instance started and the two libs were
added. Then while still signed on as division A, I signed on as
division B. When I checked the *LIBL of the QZSRCGI instance, I found
that I not only had the two libs for division A, I also had the two
libs for division B. Now I have division A data going into division B
files.
So, here is my question: Can each division have its own instance of
QZSRCGI?
This is using powered by apache on V5R4.
As an Amazon Associate we earn from qualifying purchases.