Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Finderr

-1334 The 4GL program cannot allocate any more space for temporary

string storage.

You should not see this message from a program that is compiled at a version later than Version 4.1; however, programs that are compiled by 4GL Version 4.1 and earlier must deal with this issue.

Temporary string storage is used while evaluating a character expression. It is allocated by a simple algorithm from a fixed-size buffer. Space in this buffer is not reclaimed until the last pending character expression is finished. Because most expressions complete immediately, the string buffer is normally emptied as fast as it is used.

However, when expressions involve function calls, expression evaluation is suspended during the function call. The buffer is not cleared until the function returns. For example, temporary space is used for the literal "###" and the result of the USING operator in the following statement:

LET charvar = numvar USING '###', myfunc()

These pending values remain in the string buffer for the duration of the call to myfunc(). If the aggregate total of all temporary character values that are used during the evaluation of myfunc() and its sub-functions exceeds the buffer size, this error occurs.

You can usually prevent the error by isolating function calls in separate statements, as in the following example:

LET charvar = myfunc() LET charvar = numvar USING '###', charvar clipped

The string buffer is free during the call to myfunc() in the first statement and free again as soon as the second statement completes.

The short form of a WHEN clause in a CASE statement also creates a suspended character expression. In the following example, temporary string storage is tied up throughout the calls to func_A() and func_B().

CASE charvar WHEN 'A' CALL func_A() WHEN 'B' CALL func_B() ...

The longer form of the WHEN clause does not do this because evaluation of the character expression is completed before the function call begins.

CASE WHEN charvar = 'A' CALL func_A() WHEN charvar = 'B' CALL func_B()

Finally, a known error in some versions of IBM Informix-4GL Version 4.1 causes a spurious error of this type when the WORDWRAP clause appears in a PRINT statement. If the error recurs, note all circumstances and contact IBM Informix Technical Support.