11-06-2008 9:56 AM
Hi Experts,
I have one field with 26 char length and I want split it at 10, 8,8.
ex: 28890990888899987666667889
Plz help me.
Thanks
Basu
11-06-2008 10:03 AM
Use this code.
first = string+0(10)
second = string+10(8)
third = string+18(8)
11-06-2008 10:00 AM
you need to use offset (not SPLIT)
string1 = string(10).
string2 = string+10(8).
string3 = string+18(8).
11-06-2008 10:20 AM
Thanks all, I got the solution.
Regards
Basu
Edited by: Basanagouda Sasanur on Nov 6, 2008 11:20 AM
11-06-2008 10:03 AM
Use this code.
first = string+0(10)
second = string+10(8)
third = string+18(8)
11-06-2008 10:04 AM
11-06-2008 10:08 AM
Hi,,,,,
Instead of using split do it like this this more robust.....
data: a type string,
b type string,
c type string,
d type string value '28890990888899987666667889',
seperator type c value ',',
l type string,
count type i.
count = strlen( d ).
a = d+0(10).
b = d+10(8).
c = d+18(8).
concatenate a b c into l separated by seperator.
write:/ l.
Thanks
Saurabh
11-06-2008 10:10 AM
str1 = string(10).
str2 = string+10(8).
str3 = string+18(8).
use offsets
else u can use ... FM
STRING_SPLIT_AT_POSITION
STRING_SPLIT
11-06-2008 10:11 AM
Hi,
ex: V1 = 28890990888899987666667889
V2 = V1+0(10),
V3 = V1+10(8),
V4 = V1+18(8),
11-06-2008 10:13 AM
data : stng type string.
data : stng1(10) , stng2(8) , stng3(8).
stng = '28890990888899987666667889'.
stng1 = stng(10).
stng2 = stng+10(8).
stng3 = stng+18(8).