× 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.



Bill,

>
> Using HLDCMNDEV frees up files for saves, keeps them in the same program,
> and locks their program from further input. Once RLSCMNDEV is issued they
> are able to continue along as if nothing happened.


Are you sure about that? I assume you mean to use OPTION(*CNTRLD) instead of
*IMMED, so that the program doesn't get an immediate error and its next
attempt at WS I/O.

As a test, I started two sessions. In one, I invoked a program which opened
some files. From the second, I used WRKOBJLCK to ensure the files were
locked by the job. Then I used HLDCMDDEV on the first session with
OPTION(*CNTRLD). The first session was able to continue running, and using
the files. WRKOBJLCK showed the files still in use (as I'd expect). The
first session could even return to a menu and start new programs. The only
thing it couldn't do was get a new sign on screen. When I would sign off
while held, the job ended but my final menu remained displayed with input
inhibited since the output of the sign on screen was blocked. (The files
were released and the job was no longer active in WRKUSRJOB though.) As soon
as I would RLSCMNDEV, the sign on screen would appear.

It just seems like HLDCMNDEV is a cleaner way of doing it.


I don't think it achieves the stated purposes of freeing files for the
backup, unless you use OPTION(*IMMED) in which case you could just as well
end the subsystems,

> If lots of people are ending QINTER before doing a save then perhaps that
> is
> something I should look into.


What I do is have a program as the first step of my nightly saves which uses
a loop. Inside the loop I use QUSLJOB to put a list of all jobs in a user
space. Then I iterate over the active jobs, ignoring system jobs and a few
special ones like Standguard's anti-virus engine. For each interactive job,
I check the job data to see if it is sitting at a menu or is disconnected.
If so, I just silently end the job without a joblog. If it is not at a menu,
I send a break message to the user requesting them to finish up and sign
off. If there were any interactive or (non-system) batch jobs still running,
then I delay for x minutes and repeat the loop. If after xx minutes
interactive jobs are still running, then I make the assumption they just
forgot to sign off and I end the job *Immed with a joblog. For batch jobs
which are still running after the maximum number of delay iterations, they
also get ended but with a joblog.

Once my loop determines there are no user jobs still running, it deletes the
user space used by the API and allows the backup to start.

Doug

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.