Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help!! Foxpro 2.6a in WIN2k not reading config.fp 2

Status
Not open for further replies.

mchen2

Programmer
Dec 9, 2002
6
0
0
US
How can I make FOXPRO2.6a on a WIN2K station/NW6 server read CONFIG.FP instead of CONFIG.NT?
 
CONFIG.NT and CONFIG.FP are two different files and are both used with launching old Foxpro DOS programs.

CONFIG.NT is used by Windows, in general, to set up the Windows environment to handle DOS-style applications. Settings like FILES=225 and BUFFERS=40 etc are used from this file. The "pointer" tell the system to use this is within the Advanced button screen on the Program Tab of the DOS application's Properties.

CONFIG.FP (or .FPW) is used to set up the Foxpro ONLY parameters MEMLIMITS, MVCOUNT, RESOURCE=<whatever>, etc. The CMD line of the Program Tab of the DOS application's Properties should contain the appropriate &quot;switch&quot; to tell the application to use this file. -CC:\FPD26\CONFIG.FP

Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Dear JRB-Bldr,

Thank you for your prompt help.
I have tried the followings and didn't get what we expected:
a. in the DOS Command prompt icon, I used &quot;%SystemRoot%\system32\cmd.exe -cc:\SBT8\CONFIG.FP&quot;
b. in the foxpro icon, i used &quot;c:\SBT8\FOXPRO.EXE -cc:\sbt8\config.fp&quot;

Also, I will appreciate if you could tell me how to assign an directory to store all the *.tmp created by Foxpro2.6a?

Best regards,
Michael Chen
 
I'd like to add that I assume that when I start Foxpro 2.6 DOS from an Icon or a CMD prompt on Windows 2K machine the config.nt is read first then the config.fp. So, as a test, I set files=15 in the config.nt knowing that indexing would fail. And set files=120 in the config.fp.
When I start Foxpro using the icon w/
C:\SBT8\FOXPRO.EXE -cc:\sbt8\config.fp
and the indexing it fails.

And I can't get the special CONFIG.FP Item &quot;TMPFILE <drive:> set to local drive &quot;C:&quot;. I'm assuming that it can only be set from the config.fp.

Thank You Again
Michael Chen
 
Let's reiterate here. CONFIG.NT is the Windows NT or 2000 equivelent of the old DOS CONFIG.SYS. It configures the DOS, or rather CMD.EXE environment upon shelling to the CMD interpreter. So, if you execute CMD.EXE, or any DOS based app like FoxPro 2.x for DOS, it will utilize the settings in CONFIG.NT.
Now, the settings in CONFIG.FP (or CONFIG.FPW for FoxProw Windows) are used ONLY by the currently executing FoxPro seesion, or compiled FoxPro application. If you try to include a CONFIG.FP file in the command line of the CMD.EXE icon as in your example 'a' above, CMD.EXE will try to process the CONFIG.FP as an application or even a command line switch.. It will either cause an error or just be ignored
Your example 'b' above is correct as far as a command line parameter goes, but it also matters what you have included in the file. The setting:

TMPFILES = C:\TEMP
should work fine. a FILES setting in the CONFIG.FP file will get ignored by Fox. You need to include it in the CONFIG.NT.
Dave S.
 
Dave,
I didn't realize the files and buffers in config.fp would be ignored. I thought they would modify the config.nt settings. However, I don't believe my config.fp file is initializing the environment at all. For instance, I don't seem to be able to contol the <tmpfiles> directive. And this is one that I really care about. I would like to point it to a local drive. It doesn't help that I'am not sure the actual function of each of these directives effects.

tmpfiles=c:\foxtemp
sortwork=c:\foxtemp
editwork=c:\foxtemp
progwork=c:\foxtemp

When we run testing with a dozen or more W2K workstations reading both executables and data files from a Netware 6 server we get one or more of the following errors printed to screen at different computers and everything seems to stop...in an &quot;attempting to lock file&quot; state. Or, &quot;file access denied&quot; or &quot;R:\SBT\TEST.PRG does not exist&quot;

I've read many posts that suggest network issues if Foxpro's temp files are scratching on a network drive. And I've also changed or added various settings in my config.fp.
How can I reliably test to make sure my config.fp is being read? Am I missing something important and basic in either my startup batch file????

My original config.fp
FILES=99
BUFFERS=50
MVARSIZ=50
MVCOUNT=1000
INDEX=NDX
HELP=OFF
SAFETY=OFF
SYSMENU=ON
NOTIFY=OFF
DEVELOPMENT=OFF
RESOURCE=OFF
TALK=OFF
EXCLUSIVE=OFF
TYPEAHEAD=128
_GENSCRN=&quot;SBTGENSC.FXP&quot;
_FOXDOC=&quot;&quot;
_FOXGRAPH=&quot;&quot;
_GENGRAPH=&quot;&quot;
_STARTUP=&quot;&quot;
_PDSETUP=&quot;&quot;
_GENPD=&quot;&quot;
_GENXTAB=&quot;&quot;
_GENMENU=&quot;&quot;


My config.nt
REM Windows MS-DOS Startup File
dos=high, umb
device=%SystemRoot%\system32\himem.sys
files=120
buffers=50

My config.fp
help=on
TALK=off
resource=c:\foxtemp
tmpfiles=c:\foxtemp
sortwork=c:\foxtemp
editwork=c:\foxtemp
progwork=c:\foxtemp
*default=<app dependent>
*path=<app dependent>
MVCOUNT=1024 && 512
MEMLIMIT = 40, 16000, 16000
CATMAN=OFF
display=VGA50
century=on
codepage=auto
 
If you use
TMPFILES=C:\foxtemp
in your CONFIG.FP, you don't need
sortwork=c:\foxtemp
editwork=c:\foxtemp
progwork=c:\foxtemp

as they are all taken care of by TMPFILES.

The easiest way to verify settings is from the command window. Use:
?SYS(2019) &&... Configuration file name and location
?SYS(2023) &&... Temporary file drive
Dave S.
 
Note that if the c:\foxtemp directory doesn't exist or it's security / atrributes are such that the user can't write into it, then it won't be used.

We recently had a situation where the temp directory was being marked read-only and this caused a lot of trouble!

Rick
 
Rick,

Thanks a lot. The Foxpro2.6a environment can be initialized according to the settings in the config.nt and config.fp now.
But I also noticed there are one format of temp file as VDM????.tmp didn't go to the directory as expected.
My OS is WIN2000. How can I direct those VDM????.tmp to the directory assigned in config.fp or config.nt?

Mchen2
 
Are you sure VDM????.tmp is actually being created by your FP program? Many times applications use the environment variable setting for TMP or TEMP for establishing where temp files are stored.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top