Re: Help with Error -4518
Posted in 1993
}From: marchett@eng.gtefsd.com (Tony Marchetti) }Subject: Help with Error -4518 }Date: 17 Dec 1993 19:53:45 GMT }X-Informix-List-Id: <news.5120> }I was wondering if anyone can help me with a problem I am having when }creating a report using INFORMIX-4GL. I am receiving error number -4518 - }"The 4GL program cannot allocate any more space for temporary string }storage" during executing of my application. Has anyone had any }experience with this problem. I have contacted my local INFORMIX office }and received some input to what is going on and why, but no way to solve }the problem to date. Please remember to insert newlines in your e-mail. The above paragraph was a single line when it was sent, which can be hard to read on some terminal types. }I am running ONLINE 5.0 and INFORMIX-4GL 4.1 on a RS6000-AIX v3.2.3. This }problem occurrs when temporary string space is used. (Temporary space is }used for 1. Returning CHAR values from functions; 2. The USING, SPACES, }and ASCII functions; 3. Some forms of the CASE statement; and 4. The }Upshift( ) and Downshift() functions.) I have implemented 2 work-arounds }that INFORMIX has suggested but neither case has solved the problem. }The work-arounds consisted of: } 1. concatenating USING with a function call: } let x = 17 using "###", f() } } work-around - use a temp variable for the USING result: } let y = 17 using "###" } let x = y, f() } 2. case <variable> } when <constant> } call f() } .... } end case } } work-around - rewrite the CASE slightly: } case } when <variable> = <constant> } call f() } .... } end case }I have been informed that the cause of this problem is that the internal }stack (10 buffers - made up of 512K bytes each) fill up and do not empty }on their own and if a 4GL program runs USING enough times then the program }will generate this error. Correct. }Has anyone encountered this problem and overcome it? If anyone has any }suggestions on how I might be able to overcome this problem I would }appreciate the help. Any ideas, any anything would be appreciated. You have my sympathy. However, you will find that you have one of the listed statement types somewhere in your program, and this will be the cause of your trouble. Speaking from considerable experience, it can be the very devil of a job to find the problem -- it's the sort of job I least enjoy dealing with. However, on every occasion except one, it has proved possible to eliminate the error by being excruciatingly careful with these statements. (The one occasion involved about 4000 lines of code which was almost all string concatenation and USING operators, and I simply couldn't be bothered to do the necessary tracking down. For that system, I resorted to using a previous version of the product which didn't run into the problem in the same way, for reasons beyond my immediate comprehension.) The good news is that version 4.12 of I4GL does not generate error -4518, period. (It'll still be in the message files, but if your code is recompiled, you won't see it). And 4.12 should be available in February 94 for the first platforms (Sun, HP, and IBM), and as ported after that for other platforms. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>