You can lock users out of A-Shell by creating a file ashell.lok in the directory where miame.ini is located. You can create this file manually, or you can use LOKOUT.SBX. File details are as follows:
Line 1: <# of seconds to wait before exiting, or 0 for unlimited>
Lines 2-N: <Any text that you want to display>
An example will make this more clear:
0
A-Shell is currently locked for maintenance by the Big Kahuna
(starting at 5:30 PM and expected to last until 6 PM).
You can wait here, or hit ESC at any time to exit and try again later.
In the above example, the 0 on the first line indicates that A-Shell will wait indefinitely (until the user hits ESC, in which case it exits, or until the ashell.lok file is removed, in which case it proceeds as normal). If the 0 had been, say, 10, then the message would appear for 10 seconds but then A-Shell would exit.
While waiting, the process had not been assigned a job, but it is using the ashell.exe or ashw32.exe) executable, and has the jobtbl and qflock files open, so if your maintenance requires exclusive access to those files, you may want to set the wait to just a few seconds (just long enough to see the message) so that you will get an opportunity at exclusive access (even if it takes a few tries). On the other hand, if the maintenance does not require exclusive access to those files, you may want to allow the users to just wait indefinitely in this mode until you signal that it is ok to proceed by removing the ashell.lok file.
Note that the message should indicate the ESC option (unless the wait time is set to just a few seconds), since it isn't otherwise obvious. (This scheme allows for the maximum in site/language customization.)
To force the existing users to exit, you may be able to use KILL.LIT or FORCE.LIT, and SEND.LIT (to send a message), although this will soon be simplified via an SBX. Or, you could modify your application to check for the existence of the ashell.lok file periodically and handle its own graceful shutdown.
This function was added to A-Shell in build 952 of 8 March 2006.