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
726

Hi all

i want to make a space btw my string and parameter. below is my code. how to have a space.

CONCATENATE 'Data Type Error: Please change your data type to ' <b>space</b> ZSCSDM_OS-FIELD_DATA_TYPE into chktext.

write chktext.

thks

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
704

hi Gary,

CONCATENATE whatever1 whatever2 INTO wherever SEPARATED BY SPACE.

can be as well : SEPARATED BY '.'

in this case there will a dot between the strings, etc.

hope this helps

ec

Hi all

i want to make a space btw my string and parameter. below is my code. how to have a space.

CONCATENATE 'Data Type Error: Please change your data type to ' <b>space</b> ZSCSDM_OS-FIELD_DATA_TYPE into chktext.

write chktext.

thks

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
705

hi Gary,

CONCATENATE whatever1 whatever2 INTO wherever SEPARATED BY SPACE.

can be as well : SEPARATED BY '.'

in this case there will a dot between the strings, etc.

hope this helps

ec

Read only

Former Member
0 Likes
704

It is write.

Or you can have

CONCATENATE 'Data Type Error: Please change your data type to ' ZSCSDM_OS-FIELD_DATA_TYPE into chktext SEPARATED BY space.

Regards,

Atish

Read only

former_member386202
Active Contributor
0 Likes
704

Hi,

Use this

CONCATENATE 'Data Type Error: Please change your data type to ' ZSCSDM_OS-FIELD_DATA_TYPE into chktext separated by space.

write chktext.

Regards,

Prashant

Read only

Former Member
0 Likes
704

Hi gary,

do like this.

CONCATENATE 'Data Type Error: Please change your data type to '  ZSCSDM_OS-FIELD_DATA_TYPE into chktext seperated by space.

<b>Reward for helpful answers</b>

Satish

Read only

rainer_hbenthal
Active Contributor
0 Likes
704

Variables of type c have always blanks to fill them up to the desired length. In Concatenate, those blanks are always ignored when concatenating. You can avoid that by using the separeted clause:


concatenate 'Hello' 'World'
  into var in character mode separated by space.

In that case you will have a blank beween Hello and World.

Or you just use strings instead of Chars. Note that constants in normal quotes are treated as c-type, whereas constants in back quotes are treated as strings and strings can have trailing blanks:


concatenate `Hello ` `World`   "note the backquotes and the space after hello
  into var in character mode.