× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have a situation where the use of the RCLRSC is not doing what I expect.
I hope my long explanation does not cause you to become comatose before
you finish reading.

This is the situation. I have a stored procedure that is an RPG ILE
program that runs in a named activation group (activation group name is
the same as the program name). This program is launched through the the
Qusrwrk subsystem via the QZDASOINIT pre-start jobs. The program
basicaly handles various 'requests' to process some xml data and to return
some xml. This program (PRCWEBRQS) does a little house keeping but then
it eventually calls another ILE program (EXCWEBRQS) that runs in an
activation group called CASWEBAPP. This program simply calls a program
that is determined at run time. The 'request' parameter originally
passed into the PRCWEBRQS and passed to the EXCWEBRQS program is used to
retrieve the name of a program to call. Now this variable program name
is an RPG ILE program that runs in the *Caller activation group (in this
case it will be CASWEBAPP). There a few instances where the called
program runs in a *New activation group. This program will call any number
of other programs. Some RPGLE running in the callers activation group and
some old OPM programs. Many files are opened by the various calls and all
programs simply do a 'return' (they never end). This pre-start job is
running throughout the day and many requests come to call the stored
procedure (hundreds if not a thousand a day). But at some point there is
a potential need to 'hold' the web application. In the PRCWEBRQS program
(the stored procedure), it detects this 'hold' request (by looking a a
character in a special data structure). When a 'hold' is determined, the
program will issue a RCLACTGRP against the CASWEBAPP activation group
closing all of the opened files (and programs) that were initiated in that
name. The program also issues a RCLRSC to close those files and programs
that were opened in the default activation group. Well, it seems to not
work as the files that were opened by the OPM programs are still open in
the default activation group. Now, in trying to resolve this I changed
the stored procedure program (PRCWEBRQS) to an RPGIV program (had to move
all of my internal procedures into subroutines to get it to compile)
thinking that the RCLRSC needed to be issued from a program running in the
default activation group. This did not resolve the problem. I even
tried using the *CALLER value for the LVL parameter on the RCLRSC command.
Oh by the way, of course the RCLRSC and RCLACTGRP commands are executed
within the RPG program via a call to QCMDEXC. When the job's open files
are displayed you see that the OPM files are opened in the '*DFTACTGRP
group with that long number beside it ending in the number 2.
Interestingly, files opened by the IBM SQL interface are also in the
*DFTACTGRP but the long number ends in 1.

So, any ideas about my approach and why it appears to not work?


----------------------------------------------------
Bill Greenfield
Senior Technical Consultant
CAS Severn, Inc.
6201 Chevy Chase Drive
Laurel, MD 20707
Voice: 301 776 3400 Fax: 301 776 3444
BGreenfield@xxxxxxxxxxxxx

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.