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: 

Print Space

Former Member
0 Kudos

Hi all,

if there a value in the variable then print it else hwo to leave that much blank space.

Regards,

Mohsin

5 REPLIES 5

peter_ruiz2
Active Contributor
0 Kudos

hi,

WRITE: /(10) space.

here, (10) specifies the number of characters that will be occupied by space.

regards,

Peter

Former Member
0 Kudos

Hi,

if variabl ne ' ' .

print.

endif.

try above logic..

Former Member
0 Kudos

hi,

try this.

len = strlen(var).

If var is initial.
do len times.
write: space
enddo.
else.
write: var.
endif.

hope this will help.

Regards

Sumit Agarwal .

Former Member
0 Kudos

Hi Mohsin,

Try to print the variables using UNDER stattement. That is print each variable under some heading.

This will automatically print the variable if it has a value in it, otherwise it will leave as many spaces of that variable.

Hope this helps you.

Regards,

Chandra Sekhar

Former Member
0 Kudos

if the value is balnk while printing it will take that much blank space.

see the example

data: a(2) type c value 10,

b(2) type c ,

c(3) type c value 100.

write:/ a,b,c.