Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can we print a matrix in actual matrix form.

In COBOL after every DISPLAY statement it automatically drops to next line

so matrix looks like
1            than       1  2  3
2                       4  5  6
3                       7  8  9
4
5
6
7
8
9

can anyone tell me that can we print this in COBOL....
Posted
Updated 13-Jan-12 2:04am
v2

I guess you may use the WITH NO ADVANCING clause (see, for instance here[^]). Probably you have to add the blanks.
 
Share this answer
 
Comments
CurrentlyBE 14-Jan-12 2:29am    
thanks
It's a long time since I did any Cobol but I would suggest looking here[^].
 
Share this answer
 
Comments
CurrentlyBE 14-Jan-12 2:29am    
thanks
DISPLAY A B C
will print in a matrix way 3 variables A B and C

If you original statement was: DISPLAY X
you have to change your code to move 3 next sequential values of X to A, B and C

zb
 
Share this answer
 
Comments
Richard Deeming 11-Feb-15 11:21am    
Why are you answering a solved question from three years ago?!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900