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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dos file handles in WinXP environment 2

Status
Not open for further replies.

Jeffgarb

Technical User
Dec 27, 2003
12
US
I hope you can help me. My business depends on continuing to use a customer software application written in Clipper/Dos that is no longer supported by the creator. I have no problem using it in Win 98, but in Win XP I get the "not enough file handles" error. I go to config sys and add the line files=99, Save and reboot, which should be enough, but when I run the program in a window, I get "not enough file handles currently only 37". Obviously, WinXP is not saving the changes to the config sys. Do you have any idea what is wrong?

Another buggy issue is that There are some executable files written as part of this application. Some work fine and others lock up the system and make the internal speaker alarm go off. Why is that?

I would greatly appreciate it if you could shoot me out a few suggestions. Have a Happy New Year.
 
Hi, Jeff.

Re item #1. XP does not use config.sys, but rather uses config.nt in c:\windows\system32. Also if you need a set clipper line you put that in autoexec.nt.

Add your files line in there.

Regarding the 2nd item, I'm not sure. You say the app creates .exe files. Very unusual, and I can only suspect they do some low level hardware or memory stuff which may not be possible under NT-class OS due to restrictions on what apps are allowed to do. However I am only speculating.

I have not had that problem and I run lots of clipper stuff under XP.

One thing you might try is to set up your app to use command.com as the interpreter rather than cmd.exe which is the xp default. You will find command.com still exists, and if you use that to open a DOS window it is sometimes more compatible with DOS apps than CMD.EXE.

Jock
 
Jock,

Thanks a million for your post. Unfortunately, I am not a true tech person and could use a little bit more explanation.

Do I modify the config.nt in c:\windows\system32 in any way?

What is a set clipper line that you put in autoexec.nt? Do I use "files=99"? Can you give me an example of what I would add?

Then to clarify when my computer locks up with the internal speaker going beserk, it is when I use one of the existing executable files that were part of the custom application. These were more like macros that accomplished tasks such as adjusting fields to reflect the current year or recalculate the db indexes etc. Does this shed any more light on why this would be happening?

Finally, how do I set up the app to use command.com as the interpreter rather than cmd.exe which is the xp default?

Again, Thanks a zillion for any advice you can give me.
 
In Autoexec.nt put the following code:
SET CLIPPER=F75

In Config.nt put the following code:
FILES=99
BUFFERS=30,0

Save, and Re-boot your machine.

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
I'm not sure if the Buffers command even works on XP. I have not used it since Windows 3.11, certainly not on 95/98 so I wouldn't use it on XP at all, Windows takes care of all of that now. Also, you don't have to re-boot the PC after these changes, just open a new command window.

With the Files command, go to the bottom of config.nt and edit the existing Files line to what you had in config.sys on your 98 system.

Is there one of these small exe's that you can zip and send to me with its data files so that I can see what happens on my system?





Ian Boys
DTE Systems Ltd
 
Bozz,

So the rest is correct?

In Autoexec.nt put the following code:
SET CLIPPER=F75

In Config.nt put the following code:
FILES=99

More about what happens when the computer locks up. I have a database application written in clipper dos. There are several exe files that all do a function in the program. By looking into the directory and trying to click on each of them, there are some that run without a hitch and others that cause the XP machine to lock and the internal clock "alarm" goes off. The important file that is locking up is called "RTUTIL.EXE" and this somehow directs the drop down user interface form menu option in the app to do things like set the calander year in the user form. RTUTIL.EXE must drive a sub menu with different user options and this is the file that is locking up.

I can't see your email address. How do I send you one of these files?

Jeff

 
Jeff,
Yes and Yes. My email address is dte at btinternet dot com

Ian Boys
DTE Systems Ltd
 
I'd like to ask everyone if someone has an idea how else to solve the CPU release issue with 5.2e Clipper. Bozz was able to find me the Citrix Systems patch to address the CPU release to the keyboard loop, but this was not a successful solution to runing my exe file in WinXP. Does anyone have any ideas?
----------------------------------------------------


As I thought, the exe didn't run - other than to
> come up with an error trap - due to the lack of data
> files.
>
>
>
> Unless they are using a method I'm not party to,
> there seems to be no provision for the idle problem
> Clipper 5.2e has. If you don't know about this,
> Clipper fails to release CPU time back to the system
> and therefore runs at 100% CPU utilisation all the
> time, screwing just about everything else the
> computer does. To check this out, do an Alt-Ctrl-Del
> and select Performance while the app is running and
> see if it's 100%.
>
>
>
> There is a solution for this, a patch, which I have
> done on the exe that you sent. You could try this to
> see if it helps, but backup the original first!!!!!
>
>
>
>
> I have enclosed the patch routine, basically create
> a directory called IDLE and unzip the data there,
> put your EXE's in the same directory and run IDLE
> EXENAME without the extension. You should then get
> something like this:
>
>
>
> c:\IDLE>copy rtutil.exe program.exe
>
> 1 file(s) copied.
>
>
>
> c:\IDLE>cd\idle
>
>
>
> C:\IDLE>patcha clip2f
>
>
................................................................................
>
>
................................................................................
>
>
................................................................................
>
>
................................................................................
>
>
................................................................................
>
>
................................................................................
>
>
................................................................................
>
>
................................................................................
>
> ......................................
>
> Search pattern found at A8A66
>
>
................................................................................
>
> .................................
>
> Patch clip2f.PAT installed correctly
>
> C:\IDLE>copy program.exe rtutil.exe
>
> 1 file(s) copied.
>
>
>
> The EXE's with "come out" patched.
>
>
>
> PLEASE BACKUP THE FILES FIRST!!!!! Paranoia's not
> a bad thing.
>
>
>
> Hope this helps
>
>
>
> Ian Boys
 
Hi, Jeff

I have had some success in using .exe's for which the source is not available by using command.com as the interpreter under xp.

The big advantage is if you set up a dos command which uses command.com rather than cmd.exe, in the properties you have a couple of configuration options available that are useful, in this case idle sensitivity may help.

To set up such a shortcut on the desktop:

- right click on wallpaper
- go to new and click on shortcut. The create shortcut wizard will start.
- in the location of the item put:
C:\WINDOWS\SYSTEM32\COMMAND.COM
- click on next
- give it a name
- click on finish

Now you will have an MS-DOS prompt on your desktop with the old Win 9x style icon.

- Right click on it and click on properties.
- Click on the MISC tab. In there you will find Idle
sensitivity. Move it all the way to the right (High)
- Click on apply and close the properties window.

Now try your app using a dos window opened with the new shortcut and see if that helped. If not, try it all the way to the left (low) - you may have to play with it a bit.

I have found this works well in making some clipper progs run under PC Anywhere or VNC without locking out the comms and also in giving more normal keyboard response when other windows are open.

I will be interested to hear if it helps in your case.

JOck
 
Jock,

I will try this, but let me try to explain something. The app is a database with about 10 exe files in the directory. The main database program works fine in the XP environ, but there are three other exe files that don't work either through the main apps (app utilities)drop down menu or by clicking them directly in the folder. By clicking them in the folder I can tell which execs work and which dont'. Since the execs are normally triggered through the main app form, how does setting up the pif differently apply. For illustration, below are the drop down menu commands (taken from running in W98) that the file RTUTIL.EXE normall runs. How should I proceed?

[Avail Mem:1395]--- Utilities Main Menu------------
A) Delete, Mark Customers Inactive/Active
B) Change Year
C) Old Record/Quotes Deletion
D) Create Zip Code File From Customer File
E) Create Missing Files
F) Create Miscellaneous files
G) Recalculate Files
H) Cleanup Temporary Files
I) View/Print Manuals
J) Import/Export Catalog
K) Remove Duplicates
L) Align Order/Invoice
M) View/Print Error Log
N) Align Order/Customer ID
P) Reset Screen Attributes
Q) Rebuild Category File
R) Reset System File
S) Upper/Lower Case Converter
T) Export Orders
U) Recover Line Items
V) Convert Dates to Y2K Format
 
Hi, Jeff

By clicking on the .exe in the folder, you are implicitly invoking cmd.exe and handing it the name of the .exe you have double clicked on for it to run. For now I am suggesting you set up a shortcut icon that just uses command.com and opens a dos prompt for testing purposes.

At the dos prompt cd \path\folder to get to the folder where your .exe files (and I assume databases) reside. Of course command.com does not understand long filenames, so if the path and/or folder have names longer than 8.3 you will have to use the DOS ~1 and ~2 names, as in Win 98.

Alternatively copy everything into a temporary folder with a short name off the root of C: to make it easier.

Once you get to the folder, at the dos prompt type rtlink or the name of whatever program you want to test. When you exit it should put you back at the dos prompt. If your app is invoked via a batch file then you can run that instead in order to try the full menu.

If it works under command.com, then post back and we can go over how to set up a shortcut to use command.com to run your app.

If it doesn't work then we think about alternatives.

Jock
 
Jock,

I set up the command.com ms dos prompt and tried to run the exe file in it, but still the same lockup. Also tried Ian's patched up file. What do you think?

Jeff Garb
 
Hi, Jeff

Sorry to hear still no joy.

Another couple of ideas ...

- Try disabling expanded memory.

In the properties of the dos prompt, click on the memory tab. In Expanded (EMS) memory, make it zero. Click on apply.

Check what your clipper environment variable is set to (if any). At the dos prompt type SET, and in the resulting output look for the clipper variable. At the dos prompt, type: set clipper=E0;F##;<whatever else is already there>

where ## is the number of file handles and <whatever...there> is whatever else was in the clipper environment string, if anything. E0 (zero) means no expanded memory.

Now try your app.

- Try using TameDos

There is a commercial product called TameDos which some people have used with success which claims to make XP more DOS friendly. I have tried it with no ill effects but in my case no improvement over the idle sensitivity we already tried, so I don't use it. There is a trial version available from which might be work looking at.

Jock
 
OK. Since I am not able to program in Clipper, am I ready to hire a consultant to modify the file to work correctly? Who would I hire? I doesn't seem like it would be a lot of work for someone who knew their way around Clipper? How much do you think it would cost? How do I find someone willing to do the work?

Jeff
 
Hi, Jeff

I haven't replied to this one earlier, hoping one of the gurus here would be interested.

Although I am intrigued by your problem and would love to have a look at it, I am swamped with work right now and couldn't fit in even an evaluation for at least 2-3 weeks.

If you would like to provide your email address I can contact you when I have some availability and see if you have been able to get it solved. I don't think it is appropriate to conduct commercial transactions here.

You might also try posting to comp.lang.clipper in google groups - mayble someone there can help.

Best of luck in your efforts.

Jock
 
Jock,

I can wait a few weeks. Please email me at jeffgarb at yahoo dot com.

Jeff
 
If you are not using something to cure the timeslice problem, and you wish to multitask, then you really should use it.

Ian Boys
DTE Systems Ltd
 
Sorry, didn't realise that.

What version of Clipper are you using? If it's 5.2e or you have compiled programmes only (but not Blinker compressed) then there is a simple method of patching the programmes to release the CPU. If you want a copy of this I'll e-mail it to you.

The stuff on Klas' site involves linking in a library and basically sticking the line:
FT_OnIdle({||FT_IAmIdle(30,.T.)})
At the start of the code. When in a wait state the code block is executed and release the CPU to other processes.



Ian Boys
DTE Systems Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top