` Printed Icetips Article

Icetips Article



Par2: Using CHAIN.COM in XP
2004-06-03 -- Arie Rens
 
I assume your client encounters a 'not enough memory to chain' errormessage 
from CHAIN.COM?

The memory it refers to is called the stack by CHAIN.COM (you will see the 
'remaining stack' when you type CHAIN without parameters), but you may know 
it better as the DOS environment space

Unfortunately, it seems that the environment space is trimmed when a DOS 
command session is opened, at least I have not been able to increase this 
space before the session is opened

So the trick is to increase the available environment space inside the DOS 
session until it is 'enough' for CHAIN.COM.  How much is enough?  As a rule 
of thumb the 'remaining stack' when you type CHAIN without parameters must 
1200 or more.

So how do you increase the available environment space?
The only method I found is to reduce the length (and sometimes the number) 
of the environment variables.  When a command session is opened it makes a 
local copy of those variables, so you can trim and/or remove all the 
variables you don't for the program you are running.
A good place to start is usually the PATH command.  I assume you use a 
batchfile to call CHAIN.COM (if you don't, create one).  Inside this 
batchfile, before the line where you call CHAIN.COM, set the PATH to the 
minimum directories you need for your program.

If trimming and/or removing the existing environment variables is not 
enough (remaining stack stays below 1200), the next step is to create some 
dummy environment variables in your window environment (e/g DUMMY1, DUMMY2 
etc), and to set them to 250 characters each in the windows environment.  
When you open a DOS session the local copies of those variables will be 
available for you to remove.



Printed May 3, 2024, 10:20 pm
This article has been viewed/printed 35118 times.