COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-293
WRITE for Sequential Files
ADVANCING clause
advances the file (skips lines) before or after the record is written to it. The default
ADVANCING clause is AFTER ADVANCING 1. The ADVANCING clause can be
used only with files assigned to processes or printers.
BEFORE
specifies that the record is to be printed before any lines are skipped.
AFTER
specifies that the record is to be printed after any lines are skipped.
no-of-lines
is a numeric integer literal, or the identifier of a numeric integer data item,
whose value is greater than or equal to zero and represents the number of
lines to advance before or after the write operation.
mnemonic-name
specifies a channel position on a carriage-control tape that directs the printer to
skip lines (advancing to a particular channel is usually faster than printing lines
of spaces). mnemonic-name is defined in a SPECIAL-NAMES paragraph for
a printer (or a process simulating a printer) with the CHANNEL option.
mnemonic-name is not permitted for a file described with a LINAGE clause.
Note. When no-of-lines has the value -1, HP COBOL advances to the top of a
page; however, setting no-of-lines to -1 is not recommended, because it could
interfere with later extensions to COBOL that would allow backspacing one line. To go
to the top of a page, use BEFORE PAGE or AFTER PAGE.
BEFORE
AFTER ADVANCING
PAGE
mnemonic-name
no-of-lines LINE
LINES
VST237.vsd