


















|
|

SOS Technical Reference Document
Copyright (c) 1994 by Synergistic Office Solutions, Inc.
-------------------------------------------------------------------------------
TOPIC..: Environment Variables for SOS Programs
REVISED: 03/02/95
SUMMARY ----------------------------------------------------------------
SOS applications check the DOS environment for settings that help
determine exactly how the programs should run. On a single user
system, the INSTALL program will set all required variables correctly.
Modifications may be made to increase performance, but the settings
MUST be changed if the application directory is changed.
In a network environment, environment variable settings are critical to
the function of the system. If they are not set, or are set
incorrectly, the system will not function properly.
WHAT ARE ENVIRONMENT VARIABLES? -----------------------------------------
Your computer's operating system sets aside a small amount of memory to
hold settings that applications like OM and CM can reference. This
area hold some of the standard DOS variables, such as PROMPT and PATH,
but also any additional variables defined with the DOS "SET" command.
If you were to examine your AUTOEXEC.BAT file, you would undoubtedly
come upon several of these SET commands in the form:
SET VARIABLE=SETTING
In fact, the PROMPT and PATH commands are just specialized versions of
the SET command. It is possible for there to be too little memory set
aside for all of the SET statements in your system. If this were the
case, you would occasionally see the message "Out of environment
space". If you see such a message when you select "DOS Shell" on the
EXIT menu of CM or OM, that is a sign that you do not have a large
enough section of memory set aside to hold environment settings.
To see what is currently stored in your environment, exit to the system
prompt and type the following:
SET and press <ENTER>
Lines longer than 80 characters, such as that following PATH=, will
wrap down to the next line. Every item in the environment actually
begins with a word followed by the equals sign.
An easy way to view the settings of those environment variables that
are relevant to OM and CM operation is to select "Show Env Variables"
(OM) or "Display Environment" (CM) on the UTILITIES menu.
Environment Variables Page 2
INCREASING THE AMOUNT OF ENVIRONMENT SPACE ------------------------------
To increase the amount of memory the operating system sets aside for
environment variables, you must make a change or addition to your
CONFIG.SYS file. Use any text editor, such as the Windows Notepad, or
the DOS "EDIT" command, and open the C:\CONFIG.SYS file. If you are
able to run OM or CM, you can also use the text editor on the UTILITIES
menu to make the changes.
Look for a line in the file beginning with the word "SHELL". If it is
there, you will be changing it. If it is not, you will be adding a line
to the bottom of the file, though it really doesn't matter where in the
config file the line appears. The line should be something like this:
SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P
It is the number in the example above that determines the size of the
reserved area of memory. In this example, the area is 512 bytes, each
byte being equivalent to a single character. If you believe that the
environment space is too small, increase the size of this number,
though 512 should be sufficient in almost every case. Be sure that you
include the "/P" at the end or the setting will not be permanent.
SOS APPLICATION ENVIRONMENT SETTINGS ------------------------------------
As mentioned above, you can inspect the relevant environment settings
by selecting the appropriate option on the UTILITIES menu in either OM
or CM. These are the variables and what each one does:
PATH It is important that the PATH contain the program directory for
OM, CM, or both, if you are using both products. With CM, it is
essential -- the program will not run unless the program
directory is included in the PATH. With OM it is only really
necessary if you are using sublicenses or you have data in a
directory other than the main OM directory. The normal single
license installation puts all the files, program and data alike,
in the main directory.
-------- SETTINGS AFFECTING BOTH OM AND CM ---------
OVL_SWAP Both OM and CM are much too large for the entire program to
fit in your computer's normal work area. To maintain maximum
performance and ease of use, small portions of the program,
called "overlays" are constantly moving in and out of your
computer's active area of memory. Under normal circumstances,
overlays are frequently set aside in temporary "swap files" on
your hard disk. Where these files are placed and how they are
named is controlled by the OVL_SWAP environment variable.
If this variable is not set, the temporary swap files will be
named OVL_SWAP.$01, OVL_SWAP.$02, OVL_SWAP.$03 and so on. These
files will be created in the OM data directory in which you are
working. There is nothing wrong with this, but it is often
desirable to name and place these files in another fashion.
Environment Variables Page 3
Under normal circumstances, all temporary files are deleted by
the program if you exit the program normally by selecting Exit
to DOS on the EXIT menu. If, however, the program is terminated
abnormally due to a power outage, some sort of system crash, or
just turning off the computer while the program is still on the
screen, several of these swap files will be left on the disk.
Each time this sort of thing happens, several more are left
behind. If this number should reach 99, the program will no
longer be able to run and you will have to manually delete any
leftover temporary files. If these files were in the C:\OM
directory, you would use the following command to delete them:
DEL C:\OM\*.$* (WARNING! Be SURE you include the "$" as
shown here! A mistake here can potentially
erase all the files in your OM directory!!)
The SOS INSTALL program for OM will add the following to your
AUTOEXEC.BAT file:
SET OVL_SWAP=C:\OM\$$SOSTMP
The C:\OM part will be different if you selected a different
installation drive or directory. This setting will cause the
swap files to all be written to the main OM directory with names
beginning with $$SOSTMP (such as $$SOSTMP.$01, $$SOSTMP.$02,
etc).
Note that if you install both OM and CM, both will use the same
OVL_SWAP setting. Whichever appears last in the AUTOEXEC.BAT
file will be the active setting. For example:
(some lines)
SET OVL_SWAP=C:\OM\$$SOSTMP
(some more lines)
SET OVL_SWAP=C:\CM\ABCDEFG
(some more lines)
will mean that the overlay swap files will be created in the
C:\CM directory, and will be named ABCDEFG.$01, ABCDEFG.$02,
etc. The last SET command for a particular variable is the only
one that counts.
If you have some extended RAM to spare and would like to improve
performance, create a small RAM drive (256K or larger) in
extended memory and assign the overlay files to the RAM disk.
In addition to faster manipulation of the files, the use of a
RAM disk will prevent any possibility of unwanted accumulation
of temporary files because they will be deleted automatically
whenever the computer is re-started. Each version of DOS has
slightly different procedures to create a RAM disk. Please
refer to your DOS manual. Look in the index under "RAM Disk" or
"Virtual Disk".
CLATMP Several program operations in OM and CM involve the temporary
suspension of the main program while an accessory module or
Environment Variables Page 4
another program is run. Some examples include the viewing of
many reports on screen, the selection of "DOS Shell" on the EXIT
menu, the running of the Electronic Claims Module, and the
execution of a data backup from within OM or CM. In most cases
the process is accompanied by a blank screen with the text
"Working..." in the center.
In order to free as much work space as possible for the other
program, the SOS application writes a "memory image file" to
disk. This file can be quite large, which is why it takes a few
seconds. Exactly where (the drive and directory) this image
file is written is determined by the CLATMP environment
variable. If it is omitted, the file will just be written to
the current directory. If you have a large RAM disk (a megabyte
or more) you can specify that the image file be created there
instead of on the relatively slow hard disk. For example, if we
have a RAM disk addressed as drive D:, adding the line:
SET CLATMP=D:\
will cause the memory image file to be written there. Be
careful that you have a large area free on any disk you plan to
use. Certain operations can involve multiple image files,
quickly using up drive area.
When you return to the main program, all image files are
automatically deleted. If you were to crash the system or shut
the computer off in the middle of one of these operations, then
look at the directory of your disk, you would see leftover files
in the form:
$T12345.TMP
As long as the program is not currently in use, you can safely
delete these files.
SOSEMS Beginning with version 3.14 of OM and version 1.21 of CM, you
can reduce the amount of conventional memory required to run the
programs by setting up your system so that some EXPANDED memory
(EMS) is available, and by including the following line in your
AUTOEXEC.BAT file:
SET SOSEMS=ON
So doing will reduce the conventional memory requirements of OM
by 62K and of CM by about 50K. This can make all the
difference, particularly if you are running on a network or have
some resident programs or device drivers you want to run in the
background.
CLAVM0 Another way to conserve conventional RAM is by using other
resources to store information needed while the program is
running. The "VM" part of this variable name stands for
"virtual memory". Setting the CLAVM0 variable to a hard drive
or RAM disk permits screen images and other internal program
data to be stored on disk rather than conventional memory. It
Environment Variables Page 5
will not change the amount of memory required to start the
program, but as it is running it will need less memory to
continue to function. Note, however, that if you use the hard
disk for virtual memory, you may notice a slight performance
degradation, most notably a little pause before screens and
windows display. On a very fast computer, the difference may be
barely noticeable. On a slow computer, it may be quite
apparent.
Here are some examples:
SET CLAVM0=C:\OM,128 creates a 128k virtual memory
file in the OM directory of
drive C:
SET CLAVM0=D:\,128,M creates a 128k virtual memory
area in the RAM disk, D: When
using a RAM disk for this
purpose, be sure to add ",M"
after the desired size.
CLAVM2, CLAVM3 You can use these variables to establish secondary
sources of virtual memory in case you overflow the primary. For
example:
SET CLAVM0=D:\,64,M First use 64k of the RAM disk.
SET CLAVM2=C:\OM,128 If more is needed, overflow to
the hard disk.
-------- OM SETTINGS --------
OM The OM variable should be set to the location of the OM program
files, usually C:\OM. There are many internal operations of the
program that require this setting to be accurate, especially the
execution of programs found on the Other Tasks menu. Therefore,
there should be a line in your AUTOEXEC.BAT file similar to the
following:
SET OM=C:\OM (a trailing backslash is permitted)
OMWS The OMWS variable sets the workstation number that is referenced
by reports when they select default printers, and on networks to
show where copies of the program are in use. If the variable is
omitted, the workstation will default to 1, which is fine is a
single-user (non-network) installation. On networks and
multiuser systems, however, we strongly recommend that each
physical station be assigned a unique workstation number to make
the assignment of printers and certain error messages more
meaningful. Assignment of workstation numbers is a simple
matter of adding this variable to each station's AUTOEXEC.BAT,
using a different number at each station:
SET OMWS=1
SET OMWS=2 and so on.
Environment Variables Page 6
-------- CM SETTINGS --------
CM This setting is needed so that the program knows where to find
critical files that are normally installed in the main CM
program directory. Example:
SET CM=C:\CM
CMWS The CMWS serves the same function as OMWS (see above). In fact,
if there is a SET OMWS line in the AUTOEXEC, the CMWS setting is
not required. If CM does not find the CMWS variable it will
use the OMWS setting if it is found.
ADDING AND CHANGING ENVIRONMENT SETTINGS ------------------------
To add a new environment variable to your system, just edit the
AUTOEXEC.BAT file and add whatever SET lines you desire. See the
document "Editing your AUTOEXEC.BAT file" for more information on the
mechanics of doing so.
IMPORTANT: It is all too easy to make a spelling error while putting
in an environment setting. Follow these pointers:
1. Type the setting in UPPERCASE LETTERS ONLY. In some cases this
will not matter, but in others it may make all the difference.
2. Do NOT put any spaces on either side of the equals sign!
SET OM=C:\OM Good.
SET OM = C:\OM BAD!
3. Triple check your spelling. Be sure that zero's are zero's and not
the letter "O" and that you don't mix up 1's, I's, and l's (one's,
eye's and el's).
4. After modifying your AUTOEXEC.BAT, reboot your computer, then exit
to the system prompt and type:
SET <ENTER>
Check to be sure that your new variables show up in the list of
environment settings. If not, you may have run out of environment
space. See the beginning of this document for advice on that
issue.
RELATED DOCUMENTS ------------------------------------------------------
Editing Your AUTOEXEC.BAT File
Editing Your CONFIG.SYS File
|
|