|
Hi Mark, > Just noticed something about this thread - I am also on the web400 one, have > an issue > that I believe you have answered for me. I don't do any CGI development, so I'm not familiar with that runtime environment, and I'm not sure that any information I can offer regarding AG's will be applicable. > I have a rather complex web site (CGI-RPG) working with V5R1 - > > the programs do have usropns because of not knowing which lib > to use, this is based upon the user ID, So upon each CGI call, your program will call QCMDEXC in order to issue an override to the appropriate lib, then open the file using an opcode or the %open function. Correct? > the file I override to seems to be getting left open on me for > the next web user (since these are not new jobs, and I have them > all in the same activation group, if I understand what is going on here Is this a named AG of your own, or the default AG? > I need "this type" of web programs to have AG *new) Be careful with that... a new AG will probably be brutal in performance in a CGI environment. > Let me ask this question then too, > what happens to the files and such in the "old" AG since the job itself > does not end and the "old" AG is not "destroyed" If running in the DAG, open data paths are scoped to the call level of the program which opens the file. Therefore, when the program ends with LR on, the ODP's are destroyed. If running in a named AG (yes, QILE is a named AG), ODP's are scoped to the AG itself. Those ODP's will remain open until the AG is destroyed. If running in a *NEW AG, the same rules as the named AG apply. But because the AG is destroyed as soon as the program ends, the ODP's are closed for you. Generally speaking, using ILE programs within a host server environment (CGI, database) complicates things because there is no guarentee that the same server job will be used on each "call" from the client. Since an AG is an resource boundary within the job itself, that means that the AG and all of it's resources belong to the SERVER job - not the client. In other words, the same resources (ODP's, static variables etc) could end up being used by multiple clients. As a final note, you'd also want to make sure that you understand which AG the HTTP server jobs run in, as it will affect your CGI programs. For example, the database host server jobs run in the DAG, and that has important implications for stored procedures written in an ILE language, and compiled to run in *CALLER. As already mentioned, I'm not familiar with the HTTP server, so I can't tell you if it works the same way. Regards, John Taylor
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.