albartell wrote:
Does anybody know if there is a way to end an Apache job immediately
after the RPG CGI program is done running? I am working with
somebody where this would be a hack for sure, but would solve the
problem they have of not being able to get locks on files during the
night.

We do a nightly backup procedure that needs access to all files. Sounds similar to your situation.

Our backup procedure is a CL program. All we do is insert the following CL command into the backup procedure:

ENDTCPSVR SERVER(*HTTP) HTTPSVR(MAIN)

("main" is the name of the instance we run our CGI programs in). After the backup, we do the opposite with a STRTCPSVR. IMHO, this is a lot more elegant than ending the job after each individual RPG program runs.

Ending the job will be a disaster for performance. You could use ACTGRP(*NEW) or end the activation groups, that would accomplish the same thing as ending the jobs with much better performance. Or you could write your programs so that they close the file each times (but stay activated) which would also accomplish the same thing as ending the jobs, but would be much faster.

But I don't see why you'd want to -- just shut down the jobs during the time where you need the files -- don't do it on every call! That's the best way to ensure decent performance...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.