• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

Pascal R6009 Problem

We are running a Pascal 7.0 application across a Novell network.  When trying to do a Novell capture within our application, we are getting an R6009 runtime error - not enough space for environment.  We have looked at the PAQ on the C problem which says about removing SET options, but this is not possible.

We are running in a dos prompt on Windows 95, and the system works fine on one machine, but not on any others with what appears to be identical setups!  We've also tried on a DOS machine which produced the same error.

Any other solutions?
0
chauntry
Asked:
chauntry
  • 5
  • 3
  • 3
  • +5
1 Solution
 
omsecCommented:
TP programs mayneed easily over 550KB free conventional memory. Maybe you should try using a clean boot disk to give as much mem as possible
0
 
kimsmithCommented:
I have had several environment problems in the past and I suggest you look at your compiler directives to reserve some memory when you compile your program in Turbo Pascal. You can also overlay your program so that it does not use up so much memory. The EXE can sometime be huge under TP but all the exe is not loaded until it is needed if overlayed. I forget the compiler directive that limits memory but you can add it to the begining of your source code to limit the memory used during runtime thereby giving up some memory usage to allow for more environment space. Hope this helps.
0
 
MotazCommented:
Try to use Memmaker programme which exist in Dos directory.
This program can increase dos memory up to 700 Kb.

Motaz from Sudan.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
omsecCommented:
Motaz: No PC has more than 640KB :P
0
 
FuzzyLogicCommented:
Sometimes it is possible to convert some high memory to be used in the 640Kb, so you may get more than 640Kb in your computer.
0
 
omsecCommented:
oh, never heard that
0
 
MotazCommented:
Hello Omsec.

Dos can access up to 1 MRAM, because address represented by 20 bit; that mean 2^20 which equevelant to  1048576. But memory above 640 can be accessed only with special programes.

You can chech that by use Memmaker in proper way.

Thanks.

Motaz from Sudan

motaz1@yahoo.com
0
 
BonevCommented:
Try to increase the size of the environment. Add the following line in your CONFIG.SYS:
SHELL=C:\COMMAND.COM /E:2048
Check the DOS Manual, though, because I am not sure about the syntax of the /E option.

0
 
chauntryAuthor Commented:
Thanks for all the comments people.  We've tried the /E on command.com but to no avail.  We have the source code to the program and tried changing the $M directive at the top.  It seems that if we set it to one figure (109312) we get the R6009 error when the capture runs, but if we up it one to 109313, we get a Program To Big To Fit In Memory error when the capture runs.  We've tried to get more base memory but that didn't help either.  We're running out of ideas (and hair!). Any other suggestions?  Keep them coming cause they are much appreciated.
0
 
FuzzyLogicCommented:
A. Are you using overlays? DPMI? Any unclear asm directives?
B. What is the size of the code and the executable program?
0
 
BonevCommented:
Could you be more specific about your application? Does it only launches another capture application or it does everything?
0
 
chauntryAuthor Commented:
Yes, we are using overlays, but not DPMI, and we have no unclear asm directives.  The compiler says 118672 bytes of code, and 60774 bytes of data.  The .exe is 152kb and the .ovr is 209kb.  The program has to print things across the network and so performs a capture before it prints because it can print to many different print jobs and queues, depending on what is being printed.  That is why we can't just do a capture before we kick off the program.  Thanks for all the comments.  
0
 
chauntryAuthor Commented:
I'll try to keep upping the points as we earn them.
0
 
BonevCommented:
Try to build the application as Protected Mode executable.
0
 
FuzzyLogicCommented:
I don't sure, but I think your problem has something with the overlays you're using.
Can you recompile the program using units instead of overlays?
0
 
elkiorsCommented:
Since you're using '95, have you tried modifying the properties of the shortcut to your DOS program, ie adjusting memory allocation in there. Surely your program only really needs 361k of conventional memory, do you really need to use overlays at all ?
0
 
owCommented:
As R6009 is not a pascal runtime error, I guess you call "capture" with the "Exec" procedure. But the NetWare utility "capture" does not influence the environment.
I think you call "capture" over a batch file, where you set an environment variable.
Under DOS the environment of such a child process will always have just the size of the used(!) environment of the parent process (your pascal program). In other words, there will only be place for setting an environment variable, if you have reserved space with a dummy in the parent environment.
Maybe on the machine running the program fine, for the affected variable "set" is used somewhere before in a login script.

Do avoid these problems, I recommend to use the NetWare Print Service API functions directly in your program and not to call an external process.
0
 
chauntryAuthor Commented:
Adjusted points to 200
0
 
chauntryAuthor Commented:
Thanks.  We haven't tried the idea yet but it is the most hopeful and original idea yet.  Why didn't we think of it?
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 5
  • 3
  • 3
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now