IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to write string vertically


IBM Mainframe Forums -> COBOL Programming
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
sb lathiya

New User


Joined: 04 Jul 2012
Posts: 2
Location: India

PostPosted: Sat Mar 02, 2013 3:42 pm
Reply with quote

How can we display the string vertically in spool ? string length is 28 bytes.
eg. Input - my name is ethn matthew hunt

Output -
m
y

n
a
.
.
.
.
.
h
u
n
t
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Mar 02, 2013 4:00 pm
Reply with quote

from Your profile ...
Skills: JCL,COBOL,DB2,VSAM,CICS,Xpeditor,Chngeman,fileaid,QMF

it is strange that with a set of skills like that You' d need to ask such a simple question.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Mar 02, 2013 4:37 pm
Reply with quote

You just DISPLAY/WRITE each byte, one-at-a-time.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sun Mar 03, 2013 10:35 am
Reply with quote

There is no short-cut function of doing it in COBOL, AFAIK; you've to write a bit of code, as Bill has indicated to. Said that, have you tried something and it did not work?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sun Mar 03, 2013 6:05 pm
Reply with quote

Turn your screen 90 degrees.

Or your head.
Back to top
View user's profile Send private message
sb lathiya

New User


Joined: 04 Jul 2012
Posts: 2
Location: India

PostPosted: Sun Mar 03, 2013 8:20 pm
Reply with quote

@ Anuj , Bill : Thanks for reply

Apart from DISPLAY/WRITE ,Is there any other method we can do this???
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Mar 03, 2013 8:49 pm
Reply with quote

You want to see the output in the spool but you don't want to use WRITE or DISPLAY?

Other than going back to pre-Cobol II and using EXHIBIT, I don't know. Write and CALL an Assembler program? C/C++? FORTRAN? PL/I?

Why would you not want to use WRITE or DISPLAY?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Mar 03, 2013 8:51 pm
Reply with quote

Quote:
Apart from DISPLAY/WRITE ,Is there any other method we can do this???
What on earth do you want? COBOL allows you to WRITE to produce output to spool or a file, and DISPLAY to produce output to spool, and that is it -- there is no secret COBOL verb to output data a different way.

Topic locked since you have been given your answer, and you are not wanting the answer you were given.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top