[comp.sys.ibm.pc] DOS enviroment size / %substitution%

flowers@CS.UCLA.EDU (03/07/87)

In article <667@ubvax.UUCP> scott@ubvax.UUCP (Scott Scheiman) writes:
>Last I heard, the %environment-name% mechanism (which many today have
>correctly posted only works within batch files) is undocumented, so like
>/e:nn in the SHELL command and the various commonly-known DOS patches
>you should use at your own risk.  I can vouch that the %...%
>substitutions work fine in both DOS 3.2 and 3.1.

In my MS-DOS manual[*], it says in the entry for SET:

   When batch processing you can also use the SET command to define
   your replacable parameters by name instead of by number.  For
   example, if your batch file contains the statement "type %file%",
   you could use the SET command to set the name that MS-DOS will use
   for that variable.  In the following command, for example, SET
   replaces the %file% parameter with the filename taxes.86:
   
   	set file=taxes.86 

   So to change the replacable parameter names you don't need to edit
   each batch file.  Note also that when you use text (instead of a
   number) as a replacable parameter, the name must be ended by a
   percent sign.

* MS-DOS Version 3.2 User's Manual, p. 107, as issued with a
Zenith-181, Chapter 3 "MS-DOS Commands".  There is nothing about this
in the Chapter 4, "Batch Processing".

[The /e switch is documented in the same chapter in the entry for the
command COMMAND.  However, this pertains to the use of COMMAND at the
DOS prompt instead of in config.sys "SHELL=....".]