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
 

 

Command to leave blank lines in the report generation?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Command to leave blank lines in the report generation?
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: 276
Location: Bang,iflex

PostPosted: Thu Jun 12, 2008 4:54 pm    Post subject:
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    Post subject:
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: 276
Location: Bang,iflex

PostPosted: Thu Jun 12, 2008 5:06 pm    Post subject:
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    Post subject:
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: 276
Location: Bang,iflex

PostPosted: Thu Jun 12, 2008 5:16 pm    Post subject:
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    Post subject:
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: 743
Location: Germany

PostPosted: Thu Jun 12, 2008 5:17 pm    Post subject:
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: 743
Location: Germany

PostPosted: Thu Jun 12, 2008 5:23 pm    Post subject:
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

Active Member


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

PostPosted: Thu Jun 12, 2008 5:47 pm    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Jul 10, 2008 7:55 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Thu Jul 10, 2008 12:41 pm    Post subject:
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    Post subject:
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    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 syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


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