‎2006 Jul 25 3:11 PM
I am having one field called v_ref with length of 18 .
This filed sometimes coming with length 10 and others
spaces in the right handside.Some times with length 13
and other 5 spaces.I need to populated this field in to
some other fileld without any spaces.When it is 10 I need
to populate in to one field and if it is 13 then I need to
populate in to some other field.Can you please suggest.
‎2006 Jul 25 3:17 PM
‎2006 Jul 25 3:17 PM
‎2006 Jul 25 3:21 PM
Hi,
Find the size of the contents and transfer the contents.
ex: x_fld is your field.
condense x_fld no-gaps.
x_len = strlen(x_fld).
if x_len = 10.
move x_fld to x_fld1
elseif x_len = 13.
move x_fld to x_fld2
endif.
Regards
Appana
‎2006 Jul 25 3:26 PM
if there are spaces you can use CONDENSE for clear spaces.
later you can learn how long is it using STRLEN.
data sample(18) type c.
data len type i.
sample = ' 1234567890 '.
len = STRLEN( sample ). "len=11
condense sample. "sample = '1234567890'
len = STRLEN( sample ). "len=10
i hope this will help
thanks ibrahim