‎2008 Nov 06 10:08 AM
Hi ,
I have a String with variable length and i have to Split it in the position 255 ,so that my target String contain 255 character and remain in other String .
Can Anyone help me how to Split in position 255.
Thanks a lot in advance .
Regards,
Tarak
‎2008 Nov 06 10:09 AM
‎2008 Nov 06 10:12 AM
Hi Tarak,
There is no need of SPLIT command ,
Check the below code
FIELDA = STR(255).
FIELDB = STR+255(255)
or use FM : STRING_SPLIT_AT_POSITION
i hope these may solve your problem.
Regards
Kumar M
Edited by: mukesh kumar on Nov 6, 2008 11:13 AM
‎2008 Nov 06 10:12 AM
‎2008 Nov 06 10:13 AM
For this... say you have a string defined as
str1(260) type c,
str2(255) type c.
str3(100) type c.
str2 = str1. (this would move only 255 characters of str1 to str2)
str3 = str1 - str2.
so str3 string would have the remaining the part of the string.
thanks,
archana
‎2008 Nov 06 10:13 AM
Hi,,,
Use offset concept.
data: a type string,
b type string,
d type string, >>>>>>> contains 355 characters.
data: count type i.
count = strlen( d ).
count = count - 255.
a = d+0(255).
b = d+255(count).
now your a contains 255 charactes and b contains rest of charactes.
Thanks
Saurabh