Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
DISPLAY output vertically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
ziddiguy

New User


Joined: 20 Jul 2007
Posts: 12
Location: Germany

PostPosted: Wed Apr 30, 2008 11:32 pm    Post subject: DISPLAY output vertically
Reply with quote

Hi Guys,

Could someone tell me how can I display output in cobol vertically

e.g.
Name Pic X(4) value "TEST"


Output :-
T
E
S
T

How can i display above output
Back to top
View user's profile Send private message
References
PostPosted: Wed Apr 30, 2008 11:32 pm    Post subject: Re: DISPLAY output vertically Reply with quote

Bill O'Boyle

Active User


Joined: 14 Jan 2008
Posts: 270
Location: Orlando, FL, USA

PostPosted: Wed Apr 30, 2008 11:53 pm    Post subject: Re: DISPLAY output vertically
Reply with quote

Code:

03  WS-SUB  PIC 9(04) BINARY.
03  WS-NAME PIC X(04) VALUE 'TEST'.

PERFORM VARYING WS-SUB FROM 1 BY 1
    UNTIL WS-SUB > LENGTH OF WS-NAME
         DISPLAY WS-NAME (WS-SUB:1)
END-PERFORM.

I hope this is only an exercise or homework assignment. icon_wink.gif

Regards,

Bill
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1