Re: [Q] How to get rid of error message: -4518 temprorary string space
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
>Hi, >we have a very nasty problem and can't see why it should be our fault. >We keep getting the error >error message: -4518 The 4GL program >cannot allocate more space for temporary string storage >in our reports, when there are too many print statements for too many >lines. >So, is there a misconception on our side, is it a well known fact/bug >and how can we avoid this problem!! >Klaus I had the same problem with a Function that calls a report and I couldn't fix it by myself. A service-line from Informix here in Germany send me a fax with a solution and also a friend in Hannover gave me the same advise. Here it is, not word by word and, I hope readable in english, because I got it in german. ------------------------------------------------------------------------- The error -4518 says that an internal stack of 5 kb has ran out. The Informix-Bug-Database says that the error is fixed in release 4.12 . There is an Informix-Lib *(undocumented function)* called "acdealloc()" which job it is to clear the stack. From a 4gl-program you can call this function with "CALL acdealloc()". With RDS you have to call a c-program which calls this function. Here are the steps do do it with RDS: - edit file "fgiusr.c" (copy $INFORMIXDIR/etc/fgiusr.c) int (hallo); #include <fgifunc.h> : : : cfunc_t usrfuncs[]= { "hallo", hallo, 0, 0,0,0 }; - create a new c-file, for example xy.c hallo() { acdealloc(); } This didn't work at my side and a friend in Hannover gave me this solution: hallo() { acdealloc(); return 0; } - create a new runner (fglgo) cfglgo fgiusr.c xy.c -o newrun - Call the c-function in the RDS-program CALL hallo() - Start the program with the new runner You should pay attention that you make the call in an upper hierachy, for example after a FINISH REPORT. There is no guarantee that other important data may be deletet from the stack (because nobody nows what is at which time on the stack). ----------------------------------------------------------------------- I tried it out and it works fine! See also in the german computer-magazine "Unix Open", issue 2/94. There is an article about this problem (Unfortunately I didn't read the article). Hope this helps, Christian ------------------------------------------------------------------------- Christian Heiker heiker@quietsch.ping.de | Don't sleep in eucalyptus Dortmund Germany | trees tonight ------------------------------------------------------------------------- ## CrossPoint v3.0 ## ------------------------------------------------------------------------- Christian Heiker heiker@quietsch.ping.de | Don't sleep in eucalyptus Dortmund Germany | trees tonight ------------------------------------------------------------------------- ## CrossPoint v3.0 ##