Microsoft KB Archive/33736

= CHAIN, RUN, and KILL Statements Do Not Use MS-DOS Search PATH =

Article ID: 33736

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 1.0
 * Microsoft QuickBasic 1.01
 * Microsoft QuickBasic 1.02
 * Microsoft QuickBasic 2.0
 * Microsoft QuickBasic 2.01
 * Microsoft QuickBasic 3.0
 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1
 * Microsoft GW-BASIC Interpreter 3.23
 * Microsoft GW-BASIC 5.28

-



This article was previously published under Q33736



SUMMARY
The CHAIN &quot;FILESPEC&quot;, RUN &quot;FILESPEC&quot;, and KILL &quot;FILESPEC&quot; statements do not use the search path of the MS-DOS PATH (or APPEND) command to find the specified file. Therefore, the file that a Basic program wants to CHAIN, RUN, or KILL either must be on the default disk or directory, or the explicit path must be specified in the &quot;FILESPEC&quot; argument. Non-compliance results in the error message &quot;File not Found.&quot;

This information applies to all versions of Microsoft Basic, including the following:


 * 1) Microsoft QuickBasic Compiler Versions 1.00, 1.01, 1.02, 2.00, 2.01, 3.00, 4.00, 4.00b, and 4.50 for the IBM PC
 * 2) Microsoft Basic Compiler Versions 5.35 and 5.36 for MS-DOS
 * 3) Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2
 * 4) Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2
 * 5) Microsoft GW-Basic Interpreter Versions 3.20 and later
 * 6) Microsoft Basic Interpreter Version 5.28 for MS-DOS



MORE INFORMATION
The MS-DOS PATH command may be used to specify the search path for the compiled Basic run-time module, BRUNxx.EXE.

Normally, all programs that are CHAINed or RUN together are put in the same directory. This works even if they use different BRUNxx.EXE files (taken from different compiler versions) for programs that are executed with RUN &quot;FILESPEC&quot;, but does not work for CHAIN &quot;FILESPEC&quot;.

If you specify the explicit disk and directory path in the CHAIN or RUN statement in the program source code, the program will have to be recompiled if the CHAINed or RUN program is moved to a different disk and/or directory.

Additional query words: QuickBas BasicCom

Keywords: KB33736

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.