CFOG's PIP, March 1987, Volume 5 No. 5, Whole No. 53, page 3

Altering Mex Default Parameters

by Daryl D. Gehlbach

Modem Executive (MEX) is a flexible program that allows the user easy and direct control over many of its parameters. Thus MEX can operate under a variety of conditions. This article will discuss the ways in which you can adapt MEX to your own communication needs.

At the MEX command prompt enter the command: STAT. This will provide you with a list of parameters that can be modified. These include values, characters and switches. These may be changed as shown in the manual Mex11doc.ws. The problem is that if you need to change any values then everytime you start MEX you will have change them. That can be tedious. There must be an easier way to do this.

Ron Fowler, who wrote MEX, provides three methods for modifying operating parameters. The first is by using the MEXPAT11 file. You would alter the variables, then assemble and overlay the changes:

ASM MEXPAT11.BBZ
MLOAD MEXA.COM=MEX.COM,MEXPAT11

This seems good until you begin "tweaking" MEX. Each change means edit, assemble and load, a time consuming process.

The second method is to enter the changes while in MEX itself. Then as you modify the parameters for a given situation you can use the CLONE command to make another copy of MEX. Make your changes, then type:

CLONE Mexb.com

The new copy Mexb.com will have your modifications as default parameters. However, this also presents a difficulty, because you would need to make a separate version of MEX for each remote system.

I feel the third method is easier and provides the user with greater flexibility than the others. This method relys on READ files. MEX provides for entering commands from a file (much like submit). This allows you set up a file to change parameters as needed. Thus you can create a file Default.mex that sets up your standard parameters. At the command prompt for MEX simply type:

READ DEFAULT

MEX will read the file and execute each command as if you had typed it yourself.

However, there is an even better way. MEX can be made to READ a special file (called Ini.mex) when it loads. This involves changing a switch. You may use the patch file, but the better way is as follows. At the MEX prompt type:

STAT INITFILE ON
CLONE Mexb.com

MEX will now copy itself to Mexb.com making the change permanent. MEXB will now look for the file Ini.mex when it starts up. Now you can use Ini.mex to set up your defaults each time you use MEX.

The question now is what defaults should be set up for MEX. That depends on what you use MEX for. The following Ini.mex file shows you some examples of what the file can be used for. (The lines starting with dots {..} are comments and are ignored by the READ command).

NOTE: Any valid MEX command may be used in a READ file except LOG and another READ. If these are in a READ file, MEX will give a warning and ignore them. [Note that the numbers in the left margin are for reference purposes only, they are not part of the Ini.mex file. -- bhc]

    ..
.. Ini.mex

.. written 1-19-86
.. tested 1-19-86
..
1 STAT SILENT ON
..commands are not shown on screen
2 CLS
..clears screen
3 ALT AO:
..sets the alternate drive and user
..area to be searched for files
4 BO:
..logs to B drive where my data disk is
5 STAT SEARCH 3
..sets my search path to look first in
..the alternate area (AO) then in the
..logged area (AO)
6 STAT BAKFILE ON
..make backup of files instead of erase
7 LOAD PHONE.PHN
..load my phone directory
8 STAT SPLIT ON
..display directory one number per line
9 STAT LF ON
10 STAT XON ON
..I need these for text file trans
..mission to my electronic mail
..system DEAFNET.
11 STAT ERRID OFF
..I prefer this switch off
12 STAT FILTER ON
..this prevents garbage control
..characters from appearing on the
..terminal screen
13 STAT EXTEND ON
..eliminates need for the word READ to
..activate a READ file
14 ID "[DARYL]"
..(so I have a big ego)
15 STAT ESC "^["
..this changes the terminal escape
..character to use the ESC key on the
..OS, much like AMCALL does
16 PREFIX ""
17 STAT TRIGGER ""
18 STAT WCHAR 1
19 STAT WLINE I
..I need these set for proper SENDOUT
..use
20 SLEEP 3
..display the defaults for three
..seconds, so I can see if they are
..all right
21 CLS
..clear screen again

This is merely my example of an Ini.mex file. I encourage you to try writing your own. You should only change those values that need changing for your system.

Ini.mex is a special kind of READ file. These files provide powerful utilities to make remote work easier and faster, as we will see in future articles.

[This is the second in a series of articles on MEX that is being reprinted from Y.O.U.r Newsletter of the Yankee Osborne Group.]