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: 

write series of space characters in a list

Former Member
0 Kudos
132

Hi experts,

is there a way i can write a series of space characters in a list, i need a simpler way so that i'll not have to write it manually. right now my code looks like this.

write:/1 '|', '****', '|'. "<---(5 spaces)( represents space char).

the problem occurs when i need to write 50 spaces or more.

pls. help.

Thanks a lot.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
97

Jesus,

You can write as

write:/1 '|', 5 '|'.

.

Here you are just mentioning the position where you need to wirte. Automatically the space will be coming in between.

rgds,

TM.

Please mark points if helpful.

6 REPLIES 6

Former Member
0 Kudos
97

data : m(50) type c.

data : myspace(50) type c.

data : howmany type i.

howmany = 25.

concatenate 'kishan' 'negi' into m separated by myspace(howmany).

write m.

<b>

write:/1 '|', myspace(howmany), '|'.</b>

Former Member
0 Kudos
98

Jesus,

You can write as

write:/1 '|', 5 '|'.

.

Here you are just mentioning the position where you need to wirte. Automatically the space will be coming in between.

rgds,

TM.

Please mark points if helpful.

0 Kudos
97

data : m(50) type c.

data : myspace(50) type c.

data : howmany type i.

howmany = 25.

write:/1 '|', myspace(howmany), '|'.

if u rite this way it full fill ur requirment.

Former Member
0 Kudos
97

got it. i solved it on my own though your replies helped a lot. thanks.

former_member188685
Active Contributor
0 Kudos
97

Hi Jesus,

you can get the spaces in this way...

Just check it.

REPORT ZTEST.

write:/1 '|', <b>` ` ,` ` ,` `, ` `, ` `,` `,</b> '|'.

<b>` `</b> one space.

Regards

vijay

former_member188685
Active Contributor
0 Kudos
97

<Deleted>