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:
  1. Run WRKSBS on sub-system QHTTPSVR.
  2. Display routing entries on program QCMD in library QSYS, with compare value HTTPWWW.
  3. To add another routing entry to this subsystem, use the ADDRTGE command:


    Now, whenever a job starts in the QHTTPSVR subsystem, program YOURPGM in library YOURLIB gets called. 

  4. 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) 
    MONMSG     MSGID(CPF0000)                                 
    ENDDO                                               TFRCTL     PGM(QCMD)            ENDPGM    

Changing Library List from java Program

Every time you need something from the iSeries in your server process:
  1. Open the connection.
  2. Use"CHGLIBL (PRDDTA PRDPGM QGPL QTEMP)"); inside the java class that needs data.
  3. Find the parameter file that contains the library and change it for whichever process needs a different list. 
Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case