Hi DR2,

you most probably have an activation group problem. The service program "lingers" in memory as long as the activation group, in which it is, doesn't end.

Normally as the activation group should end when the last program of the ACTGRP ends - but this doesn't seem to be the case.

Probably because the service program does not close the DSPF (or any other file). A SRVPGM always has to handle its files manually.

Next reason could be, that the SRVPGM is running in an ACTGRP that still has open programs - like the default AG or QILE.

A solution is to have your PGM (that binds the SRVPGM and calls the SRVPGM procs) in ACTGRP(*NEW) and the SRVPGM in ACTGRP(*CALLER). This way the ACTGRP will end automatically with the calling PGM. We always design it the way, that the first CLLE is using *NEW and all subsequent PGMs and SRVPGMs are using *CALLER. This makes sure, everything is ended, when the first CLLE ends.

Another solution would be using a named activation group (like 'XYZ') and doing an RCLACTGRP XYZ *ABNORMAL - this is always an option, but not for the default ACTGRP or QILE.

A proper ACTGRP "design" is important, if you start using ILE activation groups - if you have more questions about that, feel free to contact me or ask again here on the list. Maybe with some more information about the architecture of your program/application.

HTH and kind regards,
Daniel



Am 11.02.2025 um 23:05 schrieb Charles Wilt <charles.wilt@xxxxxxxxx>:

Are you manually opening and closing the *DSPF?

You should be.

Personally, I don't agree with having DSPF in service programs.

Charles

On Tue, Feb 11, 2025 at 3:01 PM <dr2@xxxxxxxx> wrote:
Greetings all...
I don't play in this space very often so a dumb question:
I've got a service program that does a simple screen popup. When it's
done, it exits. Problem is, it's leaving a lock on the screen file,
which means I can't make changes to it sans signing off...
How do I get rid of that lock?
Thanks :)
DR2
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.