| |
How to Manage a Library List of Web Apps
by Brian Crowley
Users of the mrc-Productivity Series often want to know how to manage the library list of Web applications.
The libraries needed for an mrc-generated application are:
- MRCAPPLLIB
- the data dictionary
- any libraries where external objects are found
Adding and removing these libraries as needed is handled automatically at run-time by the generated application.
Now, suppose you want to call an external object that accesses a file in yet another library. There are two techniques that might be right for your situation.
Method #1:
Make your external object add the library to the library list. A CL external object would use the ADDLIBLE command, while RPG/COBOL could use that command as the parameter for calling QCMDEXEC. It’s also good practice to use RMVLIBLE afterward too. That is due to the fact that the server jobs remain active and are shared by subsequent client requests. The next RPG/CGI application to use that server job might anticipate a "clean" library list.
Method #2:
A second technique would be to modify the library list of the job description used for the HTTP server. Use CHGJOBD on job description QZHBHTTP in library QHTTPSVR to add your file library to the initial library list for that job description. This method may be preferred if you have many external objects that will access files in other libraries.
Always feel free to contact us with any questions you may have!
|
|
|
|