home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Depot 5
/
mediadepotvolume51993.iso
/
FILES
/
17
/
4DERR220.ZIP
/
ON!ERROR.DOC
< prev
Wrap
Text File
|
1994-10-15
|
7KB
|
142 lines
ON!ERROR.BTM
Version 2.20
Oct. 15, 1994
******
This archive contains On!Error, a BTM script file I wrote to
provide an extended command line error handling function in version
5.0, or later of 4DOS, JP Software's command processor replacement for
DOS. The idea for this was sparked by an article in the March - April
1994 issue (No. 66) of the 'The Computer Journal' by Jay Sage. I wish
to thank him for this idea, and all the other great ideas he has given
me over the years. Thanks, Jay!
To use this BTM script file, the user should first use the 4Dos
MEMORY command, to check to see if there is at least 128 bytes free in
the environment. If there is not, the user should examine the two
directives shown below in their current 4DOS.INI configuration file.
;* Define the global environment space for the system.
Environment = 512
;* Define the additional space for the secondary processor.
EnvFree = 128
Please be aware, that the two values shown here, are the normal
4Dos default values, and on most systems this should be adequate.
However, if you do need to increase the amount of space in the 4Dos
environment, you should change the 'Environment' directive by an
amount equal to the difference of 128 less the free space in your
present environment. For example, if after using the MEMORY command,
you discover there is only 80 bytes free, you should then increase
your 'Environment' value by at least 48 bytes (128 - 80 = 48) so a
setting of 560, or higher, would be fine.
Next the user must move the ON!ERROR.BTM file in this archive to
the place on their hard drive where their 4Dos script files are
stored. Then the user simply add the following alias to his, or her,
4Dos alias command file:
:* Unknown Command Alias to invoke Error Handler BTM file.
:* (Used when command processor can't resolve command line!)
Unknown_Cmd=@call c:\4dos\on!error
Of course, the above drive - path reference should be adjusted as
needed to wherever the user's batch, and 4Dos BTM files are normal
stored on their hard drive, or ram disk. Also, you *MUST* use a call
statement to invoke this BTM script file so the error handler script
can properly service other batch and BTM files.
Once installed, this BTM script file will trap ALL command
lines, that the 4DOS command processor can't resolve, by using the new
unknown command feature in version 5.0, or later, of 4DOS. After
indicating that a command error has occurred, the offending command
line will be presented to the user for possible editing before
proceeding with the execution of it again by pressing Return (Enter).
The user may also choose to delete the line by pressing the Escape
key, and then Return (Enter) to cancel the command line.
Should the user wish to abort all further processing by this BTM
script file, then pressing a 'Ctrl-C', or a 'Ctrl-Break', will abort
the script, and immediately return the user to the command line prompt,
or to the calling program.
*****
NOTE: While the On!Error.Btm script file will work right out of
the box, since it only uses normal 4DOS commands, the script code does
provide for an enhancement.
X.COM, by Keith Ledbetter, is a freeware program that provides a
means of saving disk space by grouping seldom used external DOS
commands, batch files, and other programs, into a PKZIP type archive.
X.COM then allows execution of the programs stored in this command
archive, by invoking PKUNZIP to extract them, run them, and then
delete them from the disk. When combined with the capabilities of
4DOS, this whole process can be easily automated, and made transparent
to the user working at the command line. I use this on my own system,
and have gained back considerable hard disk storage space by placing
seldom used DOS commands, like BACKUP, FDISK, RESTORE, etc., along
with software configuration tools, and other seldom used programs in
the commands archive. If you are interested in using X.COM, then you
can find it in the X_31.ZIP file found on the BBS where you obtained
this archive.
If you do decide to try out the X.COM program, first install it
per the X.COM documentation, then place the X.COM program somewhere
along your normal system's command search path. Version 2.00 of the
ON!ERROR.BTM script file contains code to detect the presence of the
X.COM program file, and automatically invoke it as an extended command
processor. NO editing changes are needed to the BTM script file, since
the script file already contains all the code needed to make use of
the X.COM program.
Samuel Vincent
P.O. Box 82
Hyde Park, PA
April 24, 1994
---------------------------------------------------------------------
Apr. 24, 1994 STV
Version 1.40 was the initial public release of this script file.
May 15, 1994 STV
Version 1.50 corrects some problems that I found in my day to
day use of this script file. I've had to add a trap to deal
with 'iff...then...else(iff)...endiff' type aliases that are
aborted prematurely. I also now trap any command verbs that
contain a wild card (*,?) character. Finally, I redesigned the
output to present a somewhat more informative display.
Sept. 1, 1994 STV
Version 2.00 added code to make automatic use of the X.COM
program, if it detects it in the system. Also the script file
corrects the problem of exiting when a Ctrl-C, or Ctrl-Break,
occurs, while the BTM file is executing. The script will now
provide for a graceful exit, should the user press Ctrl-C, or
Ctrl-Break.
Sept. 22, 1994 STV
Version 2.10 now saves the corrected command line to the 4Dos
history buffer. The script file now uses the current setting of
the display's background color, rather than using an absolute
color setting. A new exception trap was added to deal with any
errors generated from trying to 'quit' or 'cancel' prematurely
from inside an alias. Also two other traps were added. The first
for when the user tries to use On!Error on a version of 4Dos
prior to the 5.0 release. The second to make sure there is enough
space free in the environment to run. Finally, all 4Dos commands
used in the BTM script were changed so alias expansion would
*NOT* occur to help ensure compatibility on any 4Dos system.
Oct. 15, 1994 STV
Version 2.20 solves a problem of re-entering the On!Error.Btm
script file. The script file now properly handles a second,
third, etc. execution of the error handler, when the corrected
command line still contains an unknown command.