Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

what is the length of a string

Former Member
0 Kudos

Hi,

Can anybody tell me what is the length and data type of string and xstring.

best regards,

phani.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Length of the string and xstring are variable initially length is 0 Then the value varies depending on the content they hold during the runtime.

string is a sequence of type C

xstring is sequence of bytes type X

Regards

4 REPLIES 4

Former Member
0 Kudos

String data types (STRING, RAWSTRING) possess an unlimited length.

However, you can specify a length in the dictionary (at least 256 char.) . This length is taken as basis for optimizations when string fields are written to the database. From a certain length onwards, there are no further optimizations possible. Therefore, the length specification can be omitted (length 0).

If length 0 ist specified in the dictionary, no optimization is carried out during the storage on the database and an unlimited length is assumed.

Regards

Sathar

Former Member
0 Kudos

Hello,

The predefined data types string and xstring describe data objects of variable length (dynamic data objects). While the length of data objects in all other elementary data types is determined for its whole lifetime, the length of text and byte strings varies according to their content (the maximum size of a string is determined by profile parameter ztta/max_memreq_MB, see Maximum size of dynamic data objects).

Regards.

Former Member
0 Kudos

Hi,

Length of the string and xstring are variable initially length is 0 Then the value varies depending on the content they hold during the runtime.

string is a sequence of type C

xstring is sequence of bytes type X

Regards

Former Member
0 Kudos

thank u for ur replies