concat - what is the maximum string length?

dschlieder

Well Known Member
Trying to find out if there is a documented limit on the concat function in ER.

Searched here and on the knowledge garden with no luck.

Would be great if I could increase the limit with a change to an ini file, but I suspect I'm wishing for too much in this case!

I am using the data item MOTEXT which is supposed to be 30,000 characters long. However at some point, it seems that concat doesn't want to add in any more to the string, far short of 30,000 characters.

I assume I'll need to resort to some C code that I can get to run on the server to do this as it appears any of the JDE functions for string concat functions are set up to only run on the client, not the server.

Since I'm not much of a C programmer, other than a few easy hack jobs, anything I should watch out for?

Thanks,

Dave
 
There is a limit if you use varlen characters in the concat ER statement.
When varlen characters are used in concat the tool will use a temporary variable of 256 long.
To get around this problem, you need to use a string character (not varlen). Check in the DD for a string that's 30,000 long (type 2 for string).
 
Re: RE: concat - what is the maximum string length?

Hi Peter and Dave,

I checked MOTEXT on 8.9 and its type is 2 (String) and Class field is blank (not VARLEN), so maybe not this is the real solution :(

Zoltán
 
Re: RE: concat - what is the maximum string length?

Egg on face...

The function I passed my string into takes a 1000 character string.... So it was that fuction that truncated my string.

This is a custom fuction written by WB a long time ago to add media text to a sales order in our batch processing. I didn't dig into it enough - The data dictionary item is MCFG and I assumed it would take a longer string than 1000 - I didn't verify it in the DD...

Figured out how to make it all work anyway by direct insert into the F00165 table and bypassed the function.

Have a good weekend and thanks guys!

Dave
 
Back
Top