The default maximum length of delimited data is 255 bytes. Therefore, delimited fields can require significant amounts of storage for the bind array. A good policy is to specify the smallest possible maximum value if the fields are shorter than 255 bytes. If the fields are longer than 255 bytes, then you must specify a maximum length for the field, either with a length specifier or with the POSITION
clause.
For example, if you have a string literal that is longer than 255 bytes, then in addition to using SUBSTR()
, use CHAR()
to specify the longest string in any record for the field. An example of how this would look is as follows, assuming that 600 bytes is the longest string in any record for field1
:
field1 CHAR(600) SUBSTR(:field, 1, 240)