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

Advancing phrase.


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

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Sat Jan 15, 2011 12:03 pm
Reply with quote

Hi,
I am trying to generate report using ADVANCING PHRASE in cobol.
Following is the statement used:

WRITE PRINTLINE FROM HEADR-2 AFTER ADVANCING 3 LINES

As per understanding 2 blank lines should be inserted.

But no blanks line are inserted and it is printed just below the previous line. May you help how i am going wrong.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Jan 15, 2011 12:22 pm
Reply with quote

Hello,

Write the print output to a dataset and then browse this dataset. Make sure you look in column 1 as this is where the "spacing" is stored.

Quote:
As per understanding 2 blank lines should be inserted.
A bit of a misunderstanding. . .

When printed, 2 lines should be advanced, but there is no reason to clutter the output and waste space by actually generating physical blank lines.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8584
Location: Dubuque, Iowa, USA

PostPosted: Sat Jan 15, 2011 5:55 pm
Reply with quote

Quote:
As per understanding 2 blank lines should be inserted.
This is wrong. Mainframe printers, for more than 40 years, have supported the concept of carriage control. A special character in column 1 (the carriage control column) indicates to the printer that it should skip two lines before printing the rest of the data on that line. There are other special characters to cause the printer to go to the top of the next page, double space, overprint, and so forth.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Sat Jan 15, 2011 8:45 pm
Reply with quote

If you browse a FBA dataset, use CC and NOCC commands to turn display of the carrage control charcters on and off, respectively.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Mon Jan 17, 2011 8:32 am
Reply with quote

An interesting SAS usage:

At many installations, SAS logs show error messages in three consecutive lines. This seems odd, until you view column 1 and see that the CC character for the 2nd and 3rd error message lines is "+" (do not advance), causing a triple print on an actual line printer, hence showing these lines bolder due to overprinting.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Tue Jan 18, 2011 8:06 pm
Reply with quote

Your problem might be with the compler option "ADV", specifying "ADV" wil add 1 byte to your record length for the carriage control. "NOADV" with a record length of 132 for your print output will not skip or space more than 1 line because the CC byte is not included in your output but If you have 133 as your print line length then it should work.
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 Green beard: Have I coined a phrase? General Talk & Fun Stuff 3
No new posts Making Reference Phrase field " ... TSO/ISPF 11
No new posts query in rounded phrase in cobol COBOL Programming 2
No new posts Inspecting a phrase and replacing COBOL Programming 3
No new posts Write after page/advancing COBOL Programming 5
Search our Forums:

Back to Top