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

Need two spaces between numbers

Former Member
0 Likes
758

Hi,

May I know how to get two spaces between 2 and 0 which is shown below.

Input: 5300083542120406I

Requirement: 530008354212 0406I

Regards,

Raja

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
694

hi Raja,

or u can try

data: text1(20) value '5300083542120406I',

text2(20).

write: text1+0(12) to text2.

write: text112 to text214.

write: / text2.

Regards

Allan Cristian

5 REPLIES 5
Read only

Former Member
0 Likes
694

field = 5300083542120406I

concatenate field0(12) space space field12(5) into variable.

WRITE variable.

Regards,

Atish

Message was edited by:

Atish Sarda

Read only

Former Member
0 Likes
694

hi Raja,

try it:

data: text1(20) value '5300083542120406I'.

concatenate text10(12) space text112 into text1 separated by space.

write: text1.

Regards,

Allan Cristian

Message was edited by:

Allan Cristian

Read only

Former Member
0 Likes
694

See the example one :

REPORT Ztest_ytt.

data num1(10) type c.

*data num_space(2) type x value '09'.

data num_space(2) type c." value '09'.

data num2(20) type c.

data num_final(40) type c.

num1 = '100100100100'.

num2 = '200200200200'.

concatenate num1 num_space num2 into num_final separated by space.

write:/ num_final.

Thanks

Seshu

Read only

Former Member
0 Likes
695

hi Raja,

or u can try

data: text1(20) value '5300083542120406I',

text2(20).

write: text1+0(12) to text2.

write: text112 to text214.

write: / text2.

Regards

Allan Cristian

Read only

Clemenss
Active Contributor
0 Likes
694

replace '20' with '2 0' int <field>.

Regards,

Clemens