Character and String Manipulation:
Depending on the length of the character field,
string operation may be faster.
The concatenate algorithm has to compute the length of
the fixed character fields by scanning the first
non-blank character from the end.
data string1 type string.
data string2 type string.
data string3 type string.
string1 = 'mysap'.
string2 = '.com'.
concatenate string1 string2 into string3.
以上代碼的速度要比下面的代碼快:
data c1(200) type c.
data c2(200) type c.
data c3(400) type c.
c1 = 'mysap'.
c2 = '.com'.
concatenate c1 c2 into c3.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9437124/viewspace-989431/ ,如需转载,请注明出处,否则将追究法律责任。