Progress
Language Reference


PAGE Statement

Interfaces
OS
SpeedScript
All
All
Yes

Starts a new output page for PAGED output. No action is taken if output is already positioned at the beginning of a page.

SYNTAX

PAGE [ STREAM stream ] 

STREAM stream

Specifies the name of a stream. If you do not name a stream, Progress uses the unnamed stream. See the DEFINE STREAM Statement reference entry in this book and the chapter on alternate I/O sources in the Progress Programming Handbook for more information on streams.

EXAMPLE

This procedure prints a customer report, categorized by state, and starts a new page for each state.

r-page.p
DEFINE VARIABLE laststate AS CHARACTER.

OUTPUT TO PRINTER.
FOR EACH customer BY state:
  IF state <> laststate THEN DO:
    IF laststate <> "" THEN PAGE.
    laststate = state.
  END.
  DISPLAY cust-num name address city state.
END. 

NOTES

SEE ALSO

DEFINE STREAM Statement, OUTPUT TO Statement


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095