Page 1 of 1

QB PGM run 40x in win full screen get error - pgm too large

Posted: Tue Jun 19, 2007 2:24 pm
by acs
I have an old qb program which shell's to another qb program.
If I shell to the other qb program exactly 40 times in Windows 2000
full screen - program aborts and console screen message is:
Program too Large. I have changed config.nt to read files=100 thinking
that was the problem - but bombs out again after 40 shells. Anyone
have idea's on what the problem could be - or if other settings need
to be changed for the windows full screen. I believe the same message
was received in windows 98 as well. Thanks for any help

Posted: Tue Jun 19, 2007 5:01 pm
by Ralph
My first thought is: Do you terminate the program each time, or do all 40 remain running?

Posted: Tue Jun 19, 2007 7:00 pm
by Nodtveidt
SHELLing 40 concurrent times is ludicrous.

Posted: Tue Jun 19, 2007 9:53 pm
by sid6.7
why on earth would you want to shell 40 times?

is there a point to this or just to see how
far you can push your computer?

Posted: Wed Jun 20, 2007 7:48 am
by acs
Ralph wrote:My first thought is: Do you terminate the program each time, or do all 40 remain running?
Main program calls report programs then returns each time. It doesnt
matter if each of the 40 times is to run a different program or not - each of the 40 terminate/close and return to main program. Thanks

Posted: Wed Jun 20, 2007 12:44 pm
by sid6.7
hmm i made a fake gui and it shells out and doesnt bonk
after 40 shells...it must be a resource thing on your computer.

what system do you have and such....


mine calls these programs

email
internet
dos prompt
dos calender
notepad
dxdiag
hearts

Posted: Wed Jun 20, 2007 1:19 pm
by acs
Mine is calling other qb progams which run reports and return. This situation is occurring on many computers all of which are above average and os is win2000. Testing again today the # b4 aborts is 32 - so it does fluctuate. I remember this was also happening years ago (on many computers) when operating system was Win98. I've tried researching the VDM - Windows runs 16 bit basic programs in full screen or console windows with Virtual Dos Machine/vdm, but am unable to locate that error message (Program too Large) anywhere in my searchs. Thanks for your help

Posted: Wed Jun 20, 2007 1:32 pm
by MystikShadows
Then perhaps the secret is to have the systems generate the reports locally then copy them to your one place after.

Posted: Thu Jun 21, 2007 10:20 am
by Patz QuickBASIC Creations
Is itself over and over again? If so, then you're going to get that kind of error, since the NTVDM limits the available memory to DOS. Try rewriting your program to use loops instead of recursivly calling itself over and over again.

Posted: Thu Jun 21, 2007 12:29 pm
by Ralph
acs wrote:
f I shell to the other qb program exactly 40 times in Windows 2000
full screen - program aborts and console screen message is:
Program too Large.
your message, "Program too Large", seems to indicate that too much code is being loaded into memory. Assuming that none of the programs you are trying to load are actually "too large", my next thought is that you are NOT terminating one or more of the loaded programs.

To test my suggestion, please add some code to your "mother" program, so that, just before each call, it prints out the available memory, and stops, until you enter any key. If any of the reports of available memory inicates a diminution, check out that particular program for lack of an "END" or "SYSTEM" actuation. Perhaps one or more of your programs are returning BEFORE reaching an "END" command.

If you do try my suggestions, please report back your findings.

Posted: Thu Jun 21, 2007 5:12 pm
by moneo
Hi acs,

In the past, I too have had problems with programs that do multiple shells. Apparently, when you do a shell, when you come back, you don't have all the memory you had when you did the shell. I don't know why. It's like the shell operation didn't restore all the memory that it used during the operation. In your case, it adds up until you get an error.

If your main program generates reports, or data onto files which feed the report printing programs, then I suggest you split the process up and run your main program many times from a batch file. The idea of the batch file would be:
Run Main Program, which generates report1 data on workfile1.
Run Report Program that prints report1 from workfile1.
Run Main Program, which generates report2 data on workfile2.
Run Report Program that prints report2 from workfile2.
Run Main Program, which generates report3 data on workfile3.
Run Report Program that prints report3 from workfile3.
etc.

What do you think?

Regards..... Moneo