Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SPACE problem again...

Former Member
0 Kudos

Hi there...

I need to insert SPACE while concatinating a few strings. i tried to hard code SPACE, but could not succeed. now i hav assigned space to a string type variable (str4), but stil nothings happening. can someone help. the code i hav is as follows.

str4 = ' '.

SPLIT str2 AT ' ' INTO str2 str3.

CONCATENATE str1 '+0(' str2 ')' str4 ' ' str3 ' "Unicode Compatible'

INTO v_pgm_line.

regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use RESPECTING BLANKS addition of CONCATENATE to achieve your requirement.

See F1 help for RESPECTING BLANKS for example code.

Regards

Karthik D

4 REPLIES 4

Former Member
0 Kudos

CONCATENATE str1 '+0(' str2 ')' str4 ' ' str3 INTO v_pgm_line SEPARATED BY SPACE.

Former Member
0 Kudos

Hi,

Use RESPECTING BLANKS addition of CONCATENATE to achieve your requirement.

See F1 help for RESPECTING BLANKS for example code.

Regards

Karthik D

Former Member
0 Kudos

try with more sapce...

CONCATENATE str1 '+0(' str2 ')' str4 ' ' str3 INTO v_pgm_line SEPARATED BY SPACE.

rainer_hbenthal
Active Contributor
0 Kudos

>

> CONCATENATE str1 '+0(' str2 ')' str4 ' ' str3 ' "Unicode Compatible'

> INTO v_pgm_line.

> regards

Use strings instead of char. The difference is the apostrophe against back quotes.


CONCATENATE str1 `+0(` str2 `)` str4 ` ` str3 INTO v_pgm_line.