STORE
command prevents the editing of execs, and effectively makes all but the most
trivial of macros unbearable to develop. An editor that supports cut and
paste can often be useful, as is the ability to store keystrokes in macros.
My favorite DOS editor is QEdit by Semware of Marietta, Georgia. QEdit is
shareware, widely available on computer bulletin boards and publicly available
ftp sites, and has a reasonable registration fee. The Windows Notepad suffers
from a rather small buffer size, making the editing of larger files
impossible. While this is unlikely to impact the writing of execs, it does
make it unusable for viewing larger files. I have not kept current with
Windows text editors, though I have used MegaEdit (also shareware) and found
it acceptable. For OS/2, I recommend the Enhanced Editor that is included
with OS/2. There are numerous editors for any environment (one jest, for
example, is that the ratio of editors to Navy programmers is 1.25) and many
are shareware. The user should easily be able to find one that suits their
taste.A disadvantage of running OS/2 is the hardware requirements; to get satisfactory performance, you will need at least 8 megabytes of RAM and a good sized hard disk (I recommend at least 200 MB). If these conditions are met, then OS/2 may be the best of these three options for many users; it allows not only excellent DOS support, but you can also run virtually all Windows software with it as well.
The major disadvantages of Windows itself is system stability and poor multitasking. Since Windows runs under DOS, and DOS is strictly a non-multitasking system, Windows has to do a lot of work to get DOS to play the multitasking ballgame. When using Windows to multitask DOS programs, regular system crashes are not unusual, so care must be taken to save data whenever possible.
A common disadvantage with all of these systems is hardware requirements: a 386 processor and 4 MB of RAM are a must for running Desqview or Windows, and 8 MB RAM is nice. If running Windows applications, 8 MB RAM is essentially required for OS/2.
READ
or SET
command, if you specify the special
filename 'TERMINAL'
. It is also helpful to specify the number of
observations of be read, whenever this is known, using the NOBS
subcommand. For example:
READ 'TERMINAL' C50; NOBS 1.
EXEC 'macro' K
would execute MACRO.MTB K
times. If you want to keep a counter, remember to initialize it in the
calling macro e.g., LET K1=1
, and increment it in the submacro
e.g., LET K1=K1+1
. This is a convenient way to create a column
where the results of each loop are stored sequentially e.g., LET
C51(K1)=K2
.LET
K4=(K2<K3)
would make K4 equal 1 if K2 is less than K3 and 0
otherwise.
Similarly, LET K4=((K2<K3)&(K2<K1))
would make K4 equal 1
if K2 is less than both K3 and K1. I have had some problems with compound
logical evaluations like the latter expression. You may need to do the
intermediate evaluations "by hand":
LET K5 = (K2 < K3) LET K6 = (K2 < K1) LET K4 = K5 & K6
The "not" operator is ~, e.g., LET K2=~K1
; this can also be
implemented as LET K2=1-K1
. Note that the helpfile for Minitab
Release 9 for Windows, has the "or" and "not" operators reversed; this is a
typo in the helpfile. You may want to check this with Releases 7 and 8 (I no
longer own these versions); it is with the information on the LET
command.
Since access to a disk is slow relative to access to RAM, if Minitab can get the macro into RAM to read it line by line, then macro execution can be improved substantially. A disk cache uses RAM to buffer disk reads (and perhaps writes), holding data in RAM that has been retrieved from disk; subsequent reads from the same part of the disk then come from the buffer instead of rereading from disk. A virtual disk is an area of RAM that operates like a disk, except that the data stored on it are transient; when the computer is powered off, the data in the virtual disk is lost.
The advantage of a disk cache is that it is an omnibus solution; it requires no special commands to utilize once installed, and it will improve general system performance. The advantage of a virtual disk is that the data on the disk cannot be unloaded due to other disk activity; since the disk cache is a finite amount of RAM, as data is stored to it, data is also dumped out of it. If this data happens to be your macro, then Minitab's request for the macro's data will result in rereading the data from disk. Which solution works best for you depends on how much memory your system has and what you use your system for. You may want to use a combination of the two methods. DOS includes both disk cache software and virtual disk software. The disk cache software is called SMARTDRV (MS-DOS) or IBMCACHE (PC-DOS) and the virtual disk software is called either RAMDRIVE (MS-DOS) or VDISK (PC-DOS). Consult your DOS manual for details on installing either of these. Another excellent disk cache is Hyperdisk by Hyperware of Pall Mall, Tennessee; there are numerous shareware implementations of both caching and virtual disk software.
LET C5(K1) = (C4(K1) < K5)
LET C5 = (C4 < K5)