View previous topic :: View next topic
|
Author |
Message |
J.P.R.Kumar
New User
Joined: 02 Apr 2008 Posts: 11 Location: Chennai
|
|
|
|
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 |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
and you do not have to use up 132 bytes of storage either.
01 BLANK-LINES PIC x(01) value spaces. |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Yes, i gave an example to skip one line means keeping one line as blank line, not exactly coding side. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
@ 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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
coral_yhx
New User
Joined: 30 Mar 2007 Posts: 3 Location: PRC ShangHai
|
|
|
|
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
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
+ Suppress spacing, then print (overstrike previous line)
Gerry |
|
Back to top |
|
|
coral_yhx
New User
Joined: 30 Mar 2007 Posts: 3 Location: PRC ShangHai
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
coral_yhx
New User
Joined: 30 Mar 2007 Posts: 3 Location: PRC ShangHai
|
|
|
|
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 |
|
|
|