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

Format output line by line based on condition


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
psubbarao

New User


Joined: 14 Jun 2008
Posts: 1
Location: Hyderabad

PostPosted: Tue Jun 17, 2008 5:56 am
Reply with quote

Hi,

I need the following as cobol output:

1
12
123
1234
12345

Display will display the output and go to next line. How to display in the same line? and go to next line based on the condition.

Thanks,
Subbarao.P
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 17, 2008 6:09 am
Reply with quote

Hello,

Build the complete line before issuing the display. When the line is complete, display it and then start over for the next line.

If this is not what you mean, please clarify. Maybe show the input and the desired output from that input.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Tue Jun 17, 2008 2:51 pm
Reply with quote

as dick said,
you need to prepare one line for the DISPLAY.
you may opt for an array of 5 elements or a string of 5 bytes and then using Reference Modification to build the line.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
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