?
Solved

Program to big to fit in memory Clipper program

Posted on 2005-03-30
14
Medium Priority
?
1,403 Views
Last Modified: 2008-01-09
Hi,
   
   We have a program made in clipper with an os of Windows 98 Second Edition with a
   Motherboard of  P4PE2-X ASUS the following
   configurations.

   autoexec.bat
   c:\widnows\command\keyb.com us,,c:\windows\command\keyboard.sys
   set clipper =f75;s2

   config.sys
   
   device = c:\windows\command\himem.sys
   device = c:\windows\command\emm386.exe
   dos=umb,high
   files = 75
   buffers = 13
   fcbs=4,0
   stack=9,256
   lastdrive=e

   Every afternon we backup our data using pkzip version 2.04 g "dos mode". but the problem is
   sometimes it will display Program to big to fit in memory and Runtime environment error and no  
   zip file was created. What is the best configuration for config.sys that are running in windows 98
   second edition?  what  would be the cause for this?

   can anyone please help me...







 
0
Comment
Question by:therooster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
14 Comments
 
LVL 22

Expert Comment

by:JesterToo
ID: 13669189
Which version of CA-Clipper?  What linker was used to build the exe?

If you have Blinker (one of the bext linkers ever made for Clipper 5.2)  change your "RUN ..." command to use Blinkers SwpRunCmd() function.... If I remember correctly, you will need to invoke pkzip with some command-line switch to disable its use of extended memory.  I'll have to look through some of my old code to give you the exact switch.

There are other options but they depend on your version of Clipper and linker.

HTH,
Lynn
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 13671248
Try changing these lines in your config.sys


devicehigh = c:\windows\command\himem.sys
devicehigh = c:\windows\command\emm386.exe
dos=high, umb



Also try getting rid of these lines from Autoexec.bat (unless you critically require them)

REM c:\widnows\command\keyb.com us,,c:\windows\command\keyboard.sys
0
 

Author Comment

by:therooster
ID: 13677102
JesterToo ,

 the code is pkzip -ex &backup zipfile.. that is the option in the code. we are using clipper 5.01.

 
 RanjeetRain,

 how about the buffer size and the files? is it okey buffers = 13 and files = 75.  and upon searching the internet i also saw using the noems option in the emm386.exe what is that for?

0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 22

Expert Comment

by:JesterToo
ID: 13677305
You didn't say which linker you're using but if it's Blinker then replace your "run pkzip -ex &backup zipfile" with the following:

  swpruncmd( "pkzip -ex -) " + cTarget + " " + cSource, 0, "", "" )   (use your own variables or literals)

This assumes variables cTarget and cSource contain the filespecs for the resulting zipfile and the files to be archived respectively.  The command line switch "-)" is to disable pkzip's usage of 32bit DPMI.  This is necessary if you create your Clipper app as an extended mode app (which I recommend you do.  Blink Inc states that apps using the swpruncmd function usually should be "real mode" but I've found that "extended mode" works perfectly unless you start nesting the swpruncmd calls more than 3 or 4 layers deep).

The swpruncmd will free nearly all of the low-memory used by a Clipper app and make it available for use by the spawned process.

Note also that I didn't the macro operator (&) to construct the command... you should avoid macro's whenever you can in order to obtain better application performance and to use less system resources.  Clipper 5.x syntax is a huge improvement over the previous versions and makes macros unnecessary unless compiling dynamic codeblocks.

Also, Clipper 5.2e is a huge improvement over 5.01 (the last version was 5.3, however... it's somewhat of a disappointment when compared against 5.2e but is still an improvement over 5.01).  There is a free, open source product known as xHarbour that I'd recommend you take a look at if your use of Clipper is anything more than casual.  This product produces Windows 32-bit executables or *nix executables in native code (there is still a small element of "p-code" interpretation but the exe's are mostly machine code).  The product is fairly complete and offers a huge set of features that you'd expect in a Windows 32-bit language.  See http://www.xharbour.org/ for the free version and http://www.xharbour.com/ for the commercial version.

HTH,
Lynn
 
HTH,
Lynn
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 13697294
FILES at 75 is a little over kill I'd say.

FILES = 50 is more than sufficient.

Buffers you should keep at 32 minimum, for a good performance. But since you are trying to optimize the memory uses, you may prefer to keep it a at a low number, as each buffer consumes half a KB memory.
0
 

Author Comment

by:therooster
ID: 13803965
RanjeetRain,


 I tried changing

devicehigh = c:\windows\command\himem.sys
devicehigh = c:\windows\command\emm386.exe
dos=high, umb
files=50
buffers=13

and still it didn't work..







 
0
 
LVL 22

Accepted Solution

by:
JesterToo earned 500 total points
ID: 13806801
If you can't use "Blinker" then you could re-link the app using overlays.  If you construct them carefully you could reduce the memory footprint of the app considerably.  This might free up enough memory to run PkZip.

I'd seriously consider upgrading from Clipper 5.01 to something newer... 5.2e or 5.3.  Only 5.3 is still being sold commercially but there are web sites that specialize in re-selling discontinued software.  Also, you might find it on eBay sometimes.  

Lastly, a no-cost (monetarily, that is,,, there is some learning-curve involved in geting it installed and setup) option is to download the free open-source xHarbour and just recompile the app as a WIndows 32-bit text-mode app.  I've used xHarbour quite a bit and it is excellent... it has many improvements and yet remains to be about 99.999% compatible with Clipper's native syntax.  It actually fixes some bugs that were never fixed in any of the Clipper versions.  You will probably notice a considerable speed improvement over Clipper 5.01 compiled apps as well.

Regards,
Lynn
0
 

Author Comment

by:therooster
ID: 13983991
JesterToo , the program was already made by another programmer.. what i need to know is
 how to conserve memory allocation to prevent problems.
0
 
LVL 22

Expert Comment

by:JesterToo
ID: 13986094
Without the ability to modify/relink the application to allow it to consume less memory you don't have many options to fix the problem.  About the only one I can see is to reduce the buffers=13 to a lower number.  If you get too low the application(s) might run a bit slower (but they should still run).  Reducing file handles won't give you back very much memory... each one is only a few bytes in size... and they could compromise the ability of your app to execute (depends on how many dbf's, indexes, memo files, and text files you have open at any one time in your apps).

Is there any way you can obtain the source code to the app or have the original author modify it for you?  There used to be (maybe still is) a company that would de-compile a Clipper exe back to the source code for a fee.  This company at one time sold a program (Valkyrie) to end users for the same purpose.  I bought it years ago (still have it somewhere arond here) when I worked for a company that used Clipper extensively as a means to ensure we never lost the code to any of our 5000 Clipper apps... it worked great when we tested it and when we actually needed to use it 2 times.  However, with the advent of newer releases of Blinker the company stopped marketing a version that worked and went into offering the recovery service themselves (probably the market dried up for the program).  Since your app was written with Clipper 5.01 it may have been linked with another linker or with a version of Blinker early enough for it to work for you (I know it works with Clipper 5.2e and Blinker prior to version 4).

HTH,
Lynn
0
 
LVL 22

Expert Comment

by:JesterToo
ID: 14221795
Given the constraints stated surrounding the asker's question I believe my comments covered all of his available options.  Therefore, I recommend PAQing this question regardless of the awarding of points.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 14221853
I think Jester extended enough support and it can be said that the problem must have been resolved. I would recommend accepting one of Jester's comments as an answer.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Introduction to Processes
Starting up a Project
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question