Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## UP statement

> Positions the cursor on a new line in a down or multi-line frame.

> When the block specifying the down frame iterates, Progress automatically advances one frame line. Use the UP statement if you want to move to a different display line at any time.

> For more information on down frames, see the DOWN option of the Frame phrase.

> Note: Does not apply to SpeedScript programming.

> #### Syntax

>     UP [ STREAM stream ] [ expression ] [ frame-phrase ]

> `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 OpenEdge Development: Programming Interfaces for more information on streams.

> ``expression``

> Represents the number of occurrences of data in the frame that you want to move up. UP is the same as UP 1, except that nothing happens until the next data handling statement affects the screen. Several UP statements in a row with no intervening displays are treated like a single UP 1. UP 0 does nothing. If `expression` is negative, the result is the same as a DOWN `expression`.

> ``frame-phrase``

> Specifies the overall layout and processing properties of a frame. For more information on `frame-phrase,` see the Frame phrase reference entry.

> Example

> This procedure starts at the bottom of the screen and displays all the customer database records. The default frame for the FOR EACH block is a down frame. The DISPLAY statement uses that frame. Therefore, Progress automatically advances down the screen one line after each iteration. You must use an UP 2 rather than an UP 1 because there is an automatic DOWN 1 performed on the display frame at the end of each iteration of the FOR EACH block.

> r-up.p
>     FOR EACH customer:
>       UP 2.
>       DISPLAY cust-num name city.
>     END.

> #### Notes

> - When a frame is a down frame, Progress automatically advances to the next frame line on each iteration of the block that it is scoped to, whether or not you use the DOWN statement. If you do not want Progress to do this automatic advancing, name the frame outside of the current block. For more information on frames, see OpenEdge Development: Progress 4GL Handbook .

> - When Progress reaches the top frame line and then encounters an UP statement, it clears the frame and starts at the bottom line of the frame. However, if you use SCROLL, Progress moves everything in the frame down one row.

> #### See also

> DEFINE STREAM statement, DOWN statement, Frame phrase, SCROLL statement

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