Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ziddiguy

New User


Joined: 20 Jul 2007
Posts: 14
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

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, 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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us