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

Command to leave blank lines in the report generation?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
J.P.R.Kumar

New User


Joined: 02 Apr 2008
Posts: 11
Location: Chennai

PostPosted: Thu Jun 12, 2008 4:40 pm
Reply with quote

Hi All,

kindly help me in finding the exact Verb to leave Blank line.
During report generation in Cobol, What is the command used to leave blank lines?
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Thu Jun 12, 2008 4:54 pm
Reply with quote

Hi,

Do brainstorming, while creating a report you should keep in a mind that one line is equal to 132 or 133 charecters long, so in order keep one line blank means, think about it

Ok, i will give u solution.

Code:

DATA DIVISION
WORKING-STORAGE SECTION.
01  BLANK-LINES             pic x(132)      VALUE SPACES.
----
----
---
---
PROCEDURE DIVISION.
-------
----
---
---
--
WRITE REPORT-FILE FROM BLANK-LINES.


where ever u need to keep blank line after every detail line or header line, you can make use of it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 12, 2008 4:59 pm
Reply with quote

and you do not have to use up 132 bytes of storage either.

01 BLANK-LINES PIC x(01) value spaces.
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Thu Jun 12, 2008 5:06 pm
Reply with quote

Hi Dick,

Quote:
and you do not have to use up 132 bytes of storage either.


does you speaking about memory violation or performance issue???

or other wise we can use

Code:
WRITE REPORT-FILE FROM DETAIL-LINE AFTER ADVANCING  LINE 1


Here ADVANCING by line 1 keeps one line blank too.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jun 12, 2008 5:13 pm
Reply with quote

vasanthkumarhb wrote:
Hi Dick,

Code:
WRITE REPORT-FILE FROM DETAIL-LINE AFTER ADVANCING  LINE 1


Here ADVANCING by line 1 keeps one line blank too.


NO, unless DETAIL-LINE is all spaces advancing 1 line just writes the DETAIL-LINE on the next line, AFTER ADVANCING 2 LINES will skip a line.
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Thu Jun 12, 2008 5:16 pm
Reply with quote

Yes, i gave an example to skip one line means keeping one line as blank line, not exactly coding side.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jun 12, 2008 5:17 pm
Reply with quote

vasanthkumarhb wrote:
Yes, i gave an example to skip one line means keeping one line as blank line, not exactly coding side.


?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Jun 12, 2008 5:17 pm
Reply with quote

Hi !

Are you talking about the old Cobol-Tool "ReportWriter" ???

If not, why not using :

FD PRINTER
BLOCK CONTAINS 0 RECORDS
RECORDING MODE IS F.
01 REPORT-FILE.
10 REPORT-LINE PIC X(132).

Move Line-Content to REPORT-LINE

WRITE REPORT-FILE AFTER PAGE
WRITE REPORT-FILE AFTER 1 LINES
WRITE REPORT-FILE AFTER 2 LINES

Regards UmeySan
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Thu Jun 12, 2008 5:23 pm
Reply with quote

@ vasanthkumarhb

Craq is right. Unless you do not delete all the previous content in the variable before using the next Write with advancing 1 Lines, all that chars are printed ons again.

AFTER ADVANCING 2 LINES will automatically skip one line.

Regards, UmeySan
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Jun 12, 2008 5:47 pm
Reply with quote

Note than when you view reports in a file or an archiving system, you may not see all of the blank lines, because even if you code with the ADVANCING option, the lines generated use the col1 carriage-control (a vestigial term) character:

Quote:
blank = single space
0 = double
- = triple
+ = no


so if you have, say, 4 blank lines, you'll really have

Code:
-
0This is the line after 4 blank lines


where the - line is 3 blanks, and the
0 line skips one more, then prints the text (which is really in col 2).

If your view starts in col2, then you won't see col1 (duh), so you need to shift left for the whole picture.
Back to top
View user's profile Send private message
coral_yhx

New User


Joined: 30 Mar 2007
Posts: 3
Location: PRC ShangHai

PostPosted: Thu Jul 10, 2008 7:23 am
Reply with quote

so how about "+"? no line is skipped, then how is it like in report?

For example:

-
0This is the line after 4 blank lines
+
0How about + in between

icon_question.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jul 10, 2008 7:55 am
Reply with quote

Hi,

+ Suppress spacing, then print (overstrike previous line)


Gerry
Back to top
View user's profile Send private message
coral_yhx

New User


Joined: 30 Mar 2007
Posts: 3
Location: PRC ShangHai

PostPosted: Thu Jul 10, 2008 11:05 am
Reply with quote

gcicchet wrote:
Hi,

+ Suppress spacing, then print (overstrike previous line)


Gerry


so for my example:
-
0This is the line after 4 blank lines
+Overstrike
0How about + in between

So the report should be like:
-------------------------------------------



Overstrike
How about + in between
-------------------------------------------
right? No spacing, so the line will override the previous line?or print following the stop the previous line like:
---------------------------------------------------



This is the line after 4 blank linesOverstrike
How about + in between
---------------------------------------------------
?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jul 10, 2008 12:41 pm
Reply with quote

Hi,

I don't know if this will clear the air but when printing on an impact printer and the + sign is encountered, the paper will not advance and it will print this line over the top of the previous line, this is to get a bold effect.


Gerry
Back to top
View user's profile Send private message
coral_yhx

New User


Joined: 30 Mar 2007
Posts: 3
Location: PRC ShangHai

PostPosted: Fri Jul 11, 2008 2:04 pm
Reply with quote

gcicchet wrote:
Hi,

I don't know if this will clear the air but when printing on an impact printer and the + sign is encountered, the paper will not advance and it will print this line over the top of the previous line, this is to get a bold effect.


Gerry


Well , thanks a ton.
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top