You can set this at any level you want. It doesn't have to be as broad
as a virtual host! For example, let's say you have three different
environments used for CGI, they are based on three different libraries.
TESTING=Programmers developing code.
QATESTING=QA Testing environment
PRODUCTION=Programs in production
There's also libraries named DATATEST, QADATA and PRODDATA that contain
files that need to be in your library list, based on the environment.
You also want QTEMP and GLOBLIB to always be in the library list. You
could do this:
ScriptAlias /testing /QSYS.LIB/TESTING.LIB
<Directory /QSYS.LIB/TESTING.LIB>
Order deny,allow
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;GLOBLIB;TESTING;DATATEST"
</Directory>
ScriptAlias /qatesting /QSYS.LIB/QATESTING.LIB
<Directory /QSYS.LIB/QATESTING.LIB>
Order deny,allow
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;GLOBLIB;QATESTING;QADATA"
</Directory>
ScriptAlias /production /QSYS.LIB/PRODUCTION.LIB
<Directory /QSYS.LIB/PRODUCTION.LIB>
Order deny,allow
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;GLOBLIB;PRODUCTION;PRODDATA"
</Directory>
You may be able to set the library list on a per-program basis. The
reason I say "may" is because I haven't actually tried it. But if you
want to give it a try, you could do something like this:
ScriptAlias /testing /QSYS.LIB/TESTING.LIB
<Directory /QSYS.LIB/TESTING.LIB>
Order deny,allow
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;GLOBLIB;TESTING;DATATEST"
<Files SCOTTTEST.PGM>
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;SCOTTTEST;TESTING;DATATEST"
</Files>
</Directory>
The idea is that I replaced GLOBLIB with SCOTTTEST in the library list,
but only when a program named SCOTTTEST is run from the TESTING library.
Like I said, I haven't yet had an occasion to try this out, but it
should theoretically work.
matt.haas@xxxxxxxxxxx wrote:
You can also do this by adding:
SetEnv QIBM_CGI_LIBRARY_LIST "LIB1;LIB2;LIB3;LIB4"
to your httpd.conf file. I haven't tried this but you can probably even
set this at the virtual host level. With this setting, the HTTP server
will modify the CGI jobs library lists when CGI programs are run.
Matt
As an Amazon Associate we earn from qualifying purchases.