We do exactly the same thing an end followed by a start (and we start before
the backups, it jsut releases any outstanding locks, not many people
checking on colleges at 3:30 am (our time) so we don't run into locks even
after the restart

On 8/17/07, Scott Klement <web400@xxxxxxxxxxxxxxxx> wrote:

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...
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.