Kbase P143607: GET-STRING may exceed stack limits when getting values from RAW variables
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/4/2010 |
|
Status: Verified
SYMPTOM(s):
GET-STRING may exceed stack limits when getting values from RAW variables
bfMSG044 error box when running application
bfx: Field too large for a data item. Try to increase -s. (42)
FACT(s) (Environment):
All Supported Operating Systems
Products / Versions
CAUSE:
In order to extract a string from a RAW variable using the GET-STRING function the ABL needs to copy the RAW data to the stack then extract the string from the stack. In reality the ABL uses approximately twice the space allocated to the LENGTH of the RAW variable to extract a string from it. Therefore if one were to set the LENGTH of a RAW variable to 20,000 bytes, load 20,000 bytes of data into it then extract the string, using GET-STRING, the ABL actually needs 40,000 bytes of stack space for this to work.
FIX:
Increase -s when getting large values from RAW data with GET-STRING.
The actual setting for the -s parameter is in 1 kilobyte units so in addition to the standard -s calculations you may do for your application (based on -y[x] research) you should add additional allowances based on the maximum chunk size you expect to use with the GET-STRING function. e.g. for 20000 byte chunking you would add 40 to your current -s value to handle this.
For more information about using -y[x] research to determine -s settings refer to Progress Solution P79111.