Positions the cursor on a new line in a down or multi-line frame.
When the block specifying the down frame iterates, the AVM 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| STREAM-HANDLE handle][expression][frame-phrase]
STREAM stream
Specifies the name of a stream. If you do not name a stream, the AVM uses the unnamed stream. See the DEFINE STREAM statement reference entry and the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams.
STREAM-HANDLE handle
Specifies the handle to a stream. If handle it is not a valid handle to a stream, the AVM generates a run-time error. Note that stream handles are not valid for the unnamed streams. See the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams and stream handles.
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, the AVM 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 Customer.CustNum Customer.Name Customer.City.
END.
Notes
When a frame is a down frame, the AVM 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 the AVM to do this automatic advancing, name the frame outside of the current block. For more information on frames, see OpenEdge Getting Started: ABL Essentials.
When the AVM 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, the AVM moves everything in the frame down one row.