View previous topic :: View next topic
|
Author |
Message |
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Hi,
It came to me as a Huge shock when I came to know that REPORT WRITER is not present in the compiler in my shop
Any way, I took care of my report, except one detail.
I need a new page in the report when writing a new customer data. i.e. I have written the old customer data in 2 and a half pages, and the next customers data should come in the new page, NOT in the middle of the last page written. I thought EJECT would do, but I see it here that EJECT is used for cobol program listing to appear on a new page and is coded before the procedure section. Now is there a procedure section verb i can use? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
It depends. If you're using "AFTER ADVANCING" YOU WRITE PRT-REC AFTER ADVANCING PAGE.
If you're putting in your own CCs (cntl chars) in the 1st char of each line, move a "1" to the CC then WRITE the line. |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Thanks Jack,
But shouldn't the PAGE be defined here, if I am not using CC's? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi N2C,
I'm not sure I understand your ques. But PAGE tells the compiler to put a "1" in the 1st pos of the rec you WRITE with that stmt. That in turn tells the printer to skip to the top of a new page before the line is printed. |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
hy new2cobol,
note: what mmwife wants to explain to you...
the file you create should be RECFM=FBA, for A means
1 byte in beginning of this file as ASA-character.
with this position, you are able to put linefeeds, pagefeeds aso.
for structuring your report (there is no need to write empty lines!).
now with these special WRITE statements, you do not have
to do this yourself, i.e. AFTER ADVANCING PAGE
if you send your file to any host printer, this behaviour
will create you a nice rport.
note: maybe not working for LAN printer!
martin9 |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Thanks Jack and Martin,
I now understand what you are saying... |
|
Back to top |
|
|
|