The following is adapted from a Midrange Press Newsgroup Item on changing library lists on the AS/400 - iSeries Web Server:
Starting HTTP servers with different library lists
To start a testing HTTP server with a different library list from a live HTTP server:
- Run WRKSBS on sub-system QHTTPSVR.
- Display routing entries on program QCMD in library QSYS, with compare value HTTPWWW.
- To add another routing entry to this subsystem, use the ADDRTGE command:
ADDRTGE SBSD(QHTTPSVR/QHTTPSVR) SEQNBR(1) CMPVAL(*ANY) PGM(YOURLIB/YOURPGM) CLS(QHTTPSVR/QZHBHTTP)
Now, whenever a job starts in the QHTTPSVR subsystem, program YOURPGM in library YOURLIB gets called.
- Write this program using the following sample CL program that changes the library list for HTTP server job 'TESTING', while leaving the library list the same for any other HTTP server:
DCL VAR(&JOB) TYPE(*CHAR) LEN(10) RTVJOBA JOB(&JOB)
IF COND(&JOB *EQ 'TESTING') THEN(DO)
CHGLIBL LIBL(LIB1 LIB2 LIB3 LIB3)
ENDDO TFRCTL PGM(QCMD) ENDPGM
Changing Library List from java Program
Every time you need something from the iSeries in your server process:
- Open the connection.
- Use command.run("CHGLIBL (PRDDTA PRDPGM QGPL QTEMP)"); inside the java class that needs data.
- Find the parameter file that contains the library and change it for whichever process needs a different list.
Last Modified On:
No, open a new Support Case
You don't have the appropriate permissions.