Skip to Content
0
Former Member
Aug 05, 2008 at 08:22 PM

Concatenate Statement

31 Views

I'm running into issues concatenating two long char fields together into one. I am being limited to only 255 characters in my variable which I am concatenating into. This variable is defined as (1024) type c so there should be plenty of room. Can anyone help?

data v_char1(255) type c.

data v_char2(255) type c.

data v_char3(1024) type c.

v_char1 =

'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'&

'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'&

'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.

v_char2 =

'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'&

'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'&

'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.

concatenate v_char1 v_char2 into v_char3.

WRITE V_CHAR3.

Edited by: Blake Haan on Aug 5, 2008 10:25 PM