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 predefined string into a message

Former Member
0 Likes
1,443

Hi

I want the user to be able to specify the length of a message based on a predefined string - 'abc' f.ex. This means that the user choose how many occurrences of 'abc' there should be in the message. For this I need to concatenate 'abc' with 'abc' n-number of times. I have tried all posts regarding concatenation, but still no luck. How can you do this in a 'do' loop f.ex? If I say <b>CONCATENATE predef_message ' ' INTO final_message</b> the final_message is not "growing" but rather reset every time the loop is executed...

Thanks in advance!

Ole

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
719

hi,

change the code line to

CONCATENATE <b>final_message</b> ' ' predef_message ' ' INTO final_message

regards,

Navneeth.K

4 REPLIES 4
Read only

Former Member
0 Likes
720

hi,

change the code line to

CONCATENATE <b>final_message</b> ' ' predef_message ' ' INTO final_message

regards,

Navneeth.K

Read only

amit_khare
Active Contributor
0 Likes
719

try

loop.

Concatenate 'abc' pre_msg into pre_msg seperated by space.

endloop.

Do not initialize the pre_msg inside the loop.

Regards,

Amit

Reward all helpful replies.

Read only

former_member673464
Active Contributor
0 Likes
719

Hiii..

Every time you declare the concatenate you must specify the final_message before 'into ' in your statement .Other wise it will take the value of new concatenated message.

Try this concatenate final_message predef_message ' ' into final_message.

regards,

veeresh

Read only

Former Member
0 Likes
719

Hi,

CONCATENATE predef_message ' ' INTO MESSAGE. " MESSAGE is a charecter tyoe field.

CONCATENATE final_message MESSAGE INTO final_message .

Regards

Sudheer