cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Does ACL "write" have a size limit?

TomLeoboldt
1-Visitor

Does ACL "write" have a size limit?

Is there an established limit for the size of a text string written to a channel using the ACL write command? We have encountered a few instances when using the write command where this appears to be true, but I have found no documentation of this limit. To be clear, here is the line of code we are referring to:

write($channel, $text_string)

Our testing has shown that when $text_string is greater than 4,095 characters in length, the call fails.

We are running Arbortext v5.4 on UNIX.

Any suggestions would be appreciated.

Regards,
Tom
2 REPLIES 2

Hi Tom--



Yes, there is a limit to the length of strings that can be passed. The
usual way to handle this is to write smaller chunks, e.g. to write each
line as a separate operation. It's often done using an array of strings,
where each element of the array is a line.



If your string isn't line-based, you may just have to use arbitrary
breaks, e.g. every 4000 chars, something like this:



# write long string to output file

local $content = $text_string;

while (length($content)>0) {

write($channel, substr($content, 1, 4000));

$content = substr($content, 4001);

}



HTH.



--Clay



Clay Helberg

Senior Consultant



TerraXML

1380 Forest Park Circle, Suite 100

Lafayette, CO 80027

Thank you. We have implemented logic like that which you show below as a work around to the problem. I guess we will now think of it as the end solution.

Thanks again for your swift response.

Tom
Announcements

Top Tags