Setting Compaq FORTRAN environmental variables under Windows

From: William Bachman Date: October 01, 2001 technical Source: cognigencorp.com
From: "Bachman, William" <bachmanw@globomax.com> Subject: Setting Compaq FORTRAN environmental variables under Windows Millenium Edition Date: Mon, 1 Oct 2001 11:35:28 -0400 Installation of Compaq FORTRAN on PC's running under the Windows Millenium Edition (Windows ME) does not add the FORTRAN environmental variables (paths, LIB, INCLUDE, etc). even when the user requests these to be added to the system configuration files (autoexec.bat, config.sys). This necessitates running the dfvars.bat file everytime prior to FORTRAN compilation within a DOS window (such as when running NONMEM). The following method was found to be useful in adding the environmental variable to the autoexec.bat to avoid running dfvars.bat prior to running NONMEM: 1. Find "command.com" (located in c:\windows directory). Right click on command.com and bring up the "properties" window. Click on the "memory" tab and change the setting for "initial environment" from "auto" to 1280 (or larger if required). This will prevent the "out of environment space" error message when installing NONMEM from within a DOS window. 2. Bring up a DOS window (e.g by clicking on command.com). Run the following command to create a text file containing the existing environmental variables: c:\ set > set.txt 3. Change to the directory containing dfvars.bat and run the file to add the FORTRAN variables to the environment: c:\some directory\bin\ dfvars 4. Run the following command to create a text file containing the modified environmental variables: c:\some directory\bin\ set > dfset.txt 5. Compare the two text files and add the FORTRAN variables added by dfvars.bat to your autoexec.bat prefixed with "SET " (see example below). 6. Reboot your PC and check to see the FORTRAN variables have been added to your environment by running "set" within a DOS window. Example of set.txt: COMSPEC=C:\WINDOWS\COMMAND.COM PATH=C:\PERL\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND PROMPT=$p$g TEMP=C:\WINDOWS\TEMP TMP=C:\WINDOWS\TEMP winbootdir=C:\WINDOWS windir=C:\WINDOWS BLASTER=A220 I5 D1 T4 P330 CMDLINE=doskey /insert Example of dfset.txt: COMSPEC=C:\WINDOWS\COMMAND.COM PROMPT=$p$g TEMP=C:\WINDOWS\TEMP TMP=C:\WINDOWS\TEMP winbootdir=C:\WINDOWS windir=C:\WINDOWS BLASTER=A220 I5 D1 T4 P330 CMDLINE=doskey /insert DF_TOOLS=MSVC CPU=i386 IMSLNT_F90=C:\Program Files\Microsoft Visual Studio\DF98\IMSL PATH=C:\PROGRA~1\MICROS~2\COMMON\MSDEV98\BIN;C:\PROGRA~1\MICROS~2\DF98\BIN;C :\PROGRA~1\MICROS~2\VC98\BIN;C:\PROGRA~1\MICROS~2\COMMON\TOOLS;C:\PROGRA~1\M ICROS~2\COMMON\TOOLS\WIN95;C:\PERL\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND INCLUDE=C:\Program Files\Microsoft Visual Studio\DF98\IMSL\INCLUDE;C:\Program Files\Microsoft Visual Studio\DF98\INCLUDE;C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE; LIB=C:\Program Files\Microsoft Visual Studio\DF98\IMSL\LIB;C:\Program Files\Microsoft Visual Studio\DF98\LIB;C:\Program Files\Microsoft Visual Studio\VC98\LIB; VNI_F90_MSG=C:\Program Files\Microsoft Visual Studio\DF98\IMSL\MESSAGE LINK_F90=sstatd.lib sstats.lib smathd.lib smaths.lib sf90mp.lib Example of modified autoexec.bat: SET windir=C:\WINDOWS SET winbootdir=C:\WINDOWS SET COMSPEC=C:\WINDOWS\COMMAND.COM SET PROMPT=$p$g SET TEMP=C:\WINDOWS\TEMP SET TMP=C:\WINDOWS\TEMP SET DF_TOOLS=MSVC SET CPU=i386 SET IMSLNT_F90=C:\Program Files\Microsoft Visual Studio\DF98\IMSL SET PATH=C:\PROGRA~1\MICROS~2\COMMON\MSDEV98\BIN;C:\PROGRA~1\MICROS~2\DF98\BIN;C :\PROGRA~1\MICROS~2\VC98\BIN;C:\PROGRA~1\MICROS~2\COMMON\TOOLS;C:\PROGRA~1\M ICROS~2\COMMON\TOOLS\WIN95;C:\PERL\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND SET INCLUDE=C:\Program Files\Microsoft Visual Studio\DF98\IMSL\INCLUDE;C:\Program Files\Microsoft Visual Studio\DF98\INCLUDE;C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE; SET LIB=C:\Program Files\Microsoft Visual Studio\DF98\IMSL\LIB;C:\Program Files\Microsoft Visual Studio\DF98\LIB;C:\Program Files\Microsoft Visual Studio\VC98\LIB; SET VNI_F90_MSG=C:\Program Files\Microsoft Visual Studio\DF98\IMSL\MESSAGE SET LINK_F90=sstatd.lib sstats.lib smathd.lib smaths.lib sf90mp.lib nmconsult@globomax.com GloboMax LLC 7250 Parkway Drive, Suite 430 Hanover, MD 21076 Voice: (410) 782-2205 FAX: (410) 712-0737 See similar thread.