Application Development and Automation 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: 
Read only

FOR VALIDATION

Former Member
0 Likes
685

Dear All,

How to find the length of the content stored in a variable.

ex: data: str(20) type c,

n type i.

str = 'abcd'.

I want the answer to be 4 to store in n and display n.

I tried with 'DESCRIBE' it is returning the declared length of variable and displays 20.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
669

Hi

Use the Command

<b>STRLEN </b> which gives the String Length

reward if useful

regards,

Anji

5 REPLIES 5
Read only

Former Member
0 Likes
670

Hi

Use the Command

<b>STRLEN </b> which gives the String Length

reward if useful

regards,

Anji

Read only

0 Likes
669

thank u

Read only

Former Member
0 Likes
669

Hi,

U can find like this

V_LEN = STRLEN( str ).

Regards,

Krishna K.

Read only

Former Member
0 Likes
669

Hi,

STRLEN is be used to find out the length.

Regards,

Suresh

Read only

Former Member
0 Likes
669

Hi sarath,

use the command string length <b>STRLEN</b> to find the length of the variable u hav declared.

****reward points if useful.

all the best