|
"MIDRANGE-L" <midrange-l-bounces-Zwy7GipZuJhWk0Htik3J/w@xxxxxxxxxxxxxxxx> wrote on 02/22/2018
09:54:44 AM:
Thanks for the pointer. Mark Waterbury had responded to me offlinecorrect?
and sent me the code for this command. I'll probably use this approach.
Regarding having my web service receive a special parameter to shut
down, it can't reclaim the activation group because the program
itself specifies the activation group to run in. And since the
program is still running, the RCLACTGRP command fails. As far as
closing the program, *INLR works as long as *NOMAIN isn't specified
The way I handled this is to have a two-level process in its own
subsystem -- the job is a CL program that calls an RPG program to perform
the actual processing. The CL is in the default activation group and the
RPG is in a named activation group.
I coded a call to %SHTDN in the RPG program so that it would
self-end on any shutdown request (job, subsystem, or system). Then, the
CL program determines which type of shutdown was requested and, if "only"
a job shutdown then RCLACTGRP is issued for the RPG's named activation
group and loop back to call the RPG program again. The other shutdown
types would cause the CL program to self-end and, therefore, the whole
job.
This way another program I wrote queries the system to find the
job in question, by name, and sends a *CTRLD shutdown request to that job.
Voila!
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.
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.