I want to find the length of a string in a char variable. The string can have a combination of numbers and alpha, even blanks.
I think we dont have a length function in Natural. Is there a way to find it, as a temp fix i am padding some pattern chars at the end of the string using COMPRESS and EXAMINE the position of pattern chars.
if you are reading the content from a file or otherwise have a dynamic variable, there is a length function:
define data
local
1 #string(A32) init<" abc 123 def">
1 #dyn (A) dynamic
end-define
*
compress #string into #dyn leaving no space
* or - *trim removes leading and trailing spaces...
#dyn := *trim(#string)
*
write *length(#dyn)
*
end
we need to create Java service with above code and we have to use in flow service right …? dont mind for silly question , actually I am fresher trying for the same