PATH Environment Variable

The system, exec, and spawn functions use this environment variable to search for executable files and command files not located in the current directory.

In Windows, these functions use the PATH environment variable to find .bat files and DLLs. The run-time messages for an executing program must be in a DLL that is in your current directory or in one of the directories specified by the NLSPATH or PATH environment variable. Functions will search NLSPATH first, then the current directory, and finally PATH.

In OS/2, these functions use the PATH environment variable to find .cmd files.

You can specify one or more directories with this variable. In following example, the current directory would be searched first, then the directories C:\IBMCXXO\BIN, C:\IBMCXXO\HELP, E:\john, and D:\steve would be searched, in that order:

	SET PATH=C:\IBMCXXO\BIN;C:\IBMCXXO\HELP;E:\john;D:\steve


Application Run-Time Environment Variables


Set Windows Run-Time Environment Variables
Set OS/2 Run-Time Environment Variables


DPATH Environment Variable
LIBPATH Environment Variable