sang1285
19th April 2015, 07:09
Hello,
We are storing some data in a string variable and writing it to a file on unix using seq.puts function.
Currently even if we declare the string variable of length more than 2048, it truncates the remaining data.
We would like to know if it is possible to define a string of more than 2048 characters?
Thanks & Regards,
Sangeeta
bhushanchanda
19th April 2015, 10:48
Hi,
I do not think its possible. But, I guess, what you can do is, do a seq.seek() and then do a seq.write(). This way you can divide your 5000 length string into parts and write to the file.
bdittmar
19th April 2015, 12:14
Hello,
Known limits
Reports
sorting doubles correct to 6 decimal places
maximum 255 fields on a report (including array elements)
Bshell
maximum string buffer size is 4K – be careful when concatenating strings with '&' sign
maximum function stack depth is 500
Bic
maximum 255 arguments per function
maximum 32K variables per compilation
maximum BRANCH of 32K (BRANCH refers to the amount of generated code per function, including macros etc.)
SQL
The nesting level of subqueries is limited to 10. The nesting level is defined as follows. The nesting level of the main query is 1. The nesting level of a sub query immediately contained in the main query is 2. The nesting level of a sub query immediately contained in another sub query is the nesting level of that sub query plus 1.
The number of index hints that can be given on a table is limited to 4.
The SQL processor has no limit on the length of string values. However, the databases may impose restrictions on the length of string values. It is advised to keep the length of string values (including string literals and string values resulting from concatenation) below 4K.
Tables
maximum record length is 3072 bytes (for multi-byte columns take a factor 2 into account. For example, a multi-byte string of 256 characters will be 512 bytes long in a multi-byte environment.)
maximum number of fields is 1024
maximum field length is 3072 bytes
maximum number of indices per table is 20
Indexes
maximum index length is 500 bytes
maximum number of fields is 24 (no combined fields)
Regards
mroset
18th July 2018, 17:07
I've analyzed this and use long strings in our generic realtime (COM-based and Webservice-based) and batch-oriented (e.g, ASCII/XML) communication framework that's used - among others - in P2P (Purchase-to-Pay applications like Basware IP/Alusta / Palette Arena etc.), and have found the following:
The typical 6.x Baan IV Porting Set (6.1c.07.12 / 6.1c.18) supports string lengths of 132.304/132.296 bytes. If you append strings beyond that, BW crashes (very hard / very nasty) and the memory is core dumped.
Testing this in an LN environment (tested with porting set 8.7b.01 / 2012) , there does not seem to be such a limit. Have only tested it briefly, but with this Porting Set, the string lengths may be even substantially larger or even limited to the limits of the LONG or DOUBLE variables itself.
The programming solution is to use file-based operations to write/read longer strings.
Another (better and quicker) alternative (since it will be done in memory and no I/O takes place) may be to use multidimensional string arrays.
I currently state ' may be' because this is currently being implemented and results are not yet fully known.
Please note that in most situations, strings that can have up to 132.304 characters will suffice. However, when transferring XML-documents (like I do in the framework), this may well be too limited.
mark_h
19th July 2018, 15:45
Interesting. Not sure which porting set we are on but with my exports for transitioning to Oracle EBS I am using string lengths of 20k for text extracts. These get loaded into oracle with as long text.