Writing Headings with Underlines



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Writing Headings with Underlines

Postby Sushmita V » Mon Jan 23, 2012 6:17 pm

Hi,

Can anyone help me in writing a heading with underlines. I am trying to write in a PS file. I got a command saying BY ADVANCING 0 LINES. Please put some light on this.

Thanks & Regards,
Sushmita V
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: Writing Headings with Underlines

Postby Robert Sample » Mon Jan 23, 2012 6:32 pm

Depending upon the printer you are using, it may -- or may not -- be possible to do true underlines. You would have to talk to somebody at your site who knows that printer to know for sure (or find the printer manufacturer and model number, then do your own research). IF the printer supports true underlines, you would set up the underlines as a print line and write it AFTER ADVANCING 0 LINES to overprint the underlines on the same line as the text.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Writing Headings with Underlines

Postby BillyBoyo » Mon Jan 23, 2012 6:34 pm

In this case, normal "single spaced" printing would be "advancing 1". What it would do in the past, was click the printer up one sprocket, then print the line. If you use "advancing 0" the sprocket does not not move and the printing is done on the same line of the paper as was already sitting there. If there was printing on that line, the new line "overtypes" it. If the characters on your print-line are "underscores" you have managed to underline the print line.

On your PS, you will see two lines. If they are later correctly sent to the spool, you will see the correct results.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Writing Headings with Underlines

Postby Sushmita V » Mon Jan 23, 2012 6:41 pm

Ok..So even for writing it in to a PS file, we need to use AFTER ADVANCING 1 LINE command... ?
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: Writing Headings with Underlines

Postby BillyBoyo » Mon Jan 23, 2012 6:51 pm

If you are writing to a file, it depends what you want to do with that file. If, later, you want the print output as described by your program when it wrote to the file, you need to keep the correct carriage-control characters in your file. You will see them in the first column of the output. For an underlined line, you will see the original headings, with one control-character, and the underlines as a seperate line with a different control-character. What I'm trying to make clear is that in a file you will see two lines. You won't in any way see a merged-undelined-output-line if you browse a file, or the spool dataset for that matter. To see the underline in action, you have to print (and subject to Robert's points).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Writing Headings with Underlines

Postby Sushmita V » Mon Jan 23, 2012 6:58 pm

Got it. I am having my output file with headings and a line beneath that but not merged as clarified in your post. Need to check out with the printers to get it as merged-underlined-output-lines. Great help! Thanks.
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post