Application Development and Automation 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: 
Read only

CONCATENATE

Former Member
0 Likes
1,195

i have concatenated strings with comma.

but i want a space to be inserted after each comma

how is it possible to insert space after comma?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,170

Hi,

Try giving..

as ',' ' ' ',' ' ' into a variable

and at the end of the concatenate statement give

Respecting Space or separated by space.

Cheers,

Sai

i have concatenated strings with comma.

but i want a space to be inserted after each comma

how is it possible to insert space after comma?

9 REPLIES 9
Read only

Former Member
0 Likes
1,170

concatenate <f1> ',' <f2> into <f3> separated by SPACE.

Reward if useful.

Read only

Former Member
0 Likes
1,171

Hi,

Try giving..

as ',' ' ' ',' ' ' into a variable

and at the end of the concatenate statement give

Respecting Space or separated by space.

Cheers,

Sai

Read only

Former Member
0 Likes
1,170

Use separated by SPACE or

concatenate f1 space ',' space f2 into f3.

Read only

Former Member
0 Likes
1,170

hi silpa,

You can do like that :

concatenate VAR1 ',' VAR2 into VAR3 separated by SPACE.

I hope this will help you.

Help children of U.N World Food Program by rewarding points and encourage others to answer your queries.

Read only

Former Member
0 Likes
1,170

hi,

try :

concatenate f1 f2 into f3 separated by ', '. "comma, followed by a space

Regards,

Subramanian

Read only

Former Member
0 Likes
1,170

Hi,

it can be done like dis...



DATA line TYPE char80 VALUE 'hi,hello,welcome'.

WRITE line.

REPLACE ALL OCCURRENCES OF ',' IN line WITH ',|'.

TRANSLATE line USING '| '.

WRITE line.

Cheers,

Jose.

Read only

Former Member
0 Likes
1,170

Use Addition

Separated by space

along with the concatenate.

Read only

Former Member
0 Likes
1,170

Hi Silpa,

You can use the keyword SEPERATED BY SPACE.

Concatenate string1 ',' string2 into string3 seperated by space.

But here we get space between string1 and ',' also.

Inorder to avoid that, do this way.

Concatenate string1 ',' into string1.

Concatenate string1 string2 into string3 seperated by space.

Hope this helps you.

Any queries, get back to me.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
1,170

Thank you for all the replies.