Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!cec2!news From: jcb2647@cec1.wustl.edu (James Christopher Beard) Newsgroups: comp.sys.ibm.pc Subject: Re: Environment problems Keywords: environment Message-ID: <1990Mar8.162123.4418@cec1.wustl.edu> Date: 8 Mar 90 16:21:23 GMT References: <1990Mar7.073215.23815@agate.berkeley.edu> <16558@orstcs.CS.ORST.EDU> <25F5EB94.8142@maccs.dcss.mcmaster.ca> Sender: news@cec2 (USENET News System) Reply-To: jcb2647@cec1.wustl.edu (James Christopher Beard) Organization: Washington University, St. Louis MO Lines: 21 A previous response (13116) gave sound info on how to enlarge the amount of space COMMAND.COM sets aside for the environment. There is another way to get "Out of environment space" messages, though: When "shelling out" of (executing command.com from within) another program, some versions of DOS strip away all unused space from the copy of the environment they give you. Thus you may have had only 188 bytes of a 512 byte environment used up, but when you shell out of Word (or whatever) you have 188/188 bytes taken. One way around this works only with batch files: before invoking the program you may want to shell out of, have a line like "SET BUF=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx". Then, when you're in the secondary shell, issue "SET BUF=", freeing up as many bytes as there were x's (plus a few). This second step must be repeated each time you shell out. PC-DOS 3.1 doesn't do the above squeezing of child environments, but PC-DOS 3.2 does. Another reason to either upgrade (to 4.01) or downgrade (to 3.1) from 3.2. (Others include the floating-point bug in 3.2, purported bug in XCOPY, and the fact that 3.2 consumes substantially more memory than 3.1 but not significantly less than MS-DOS 4.01.)