Displays a character expression at a specified location on a screen, overlaying any other data that might be displayed at that location.
PUT SCREENATTR-SPACE NO-ATTR-SPACECOLOR color-phraseCOLUMN expressionROW expressionexpressionATTR-SPACE NO-ATTR-SPACECOLOR color-phraseThe video attributes you want to use to display an expression. When you display data in the first column of a spacetaking terminal, the AVM does not display that data with color. If you are displaying data in a column other than column 1, the AVM displays the color attribute in the column prior to the current column (current column minus 1).
NORMAL
INPUTMESSAGESprotermcap-attributedos-hex-attributeBLINK-BRIGHT-fgnd-colorbgnd-colorBLINK-RVV-UNDERLINE-BRIGHT-fgnd-colorVALUE ( expression )
For more information, see the COLOR phrase reference entry.COLUMN expressionThe column in which you want to display an expression. In the COLUMN option, expression is a constant, field name, variable name, or expression whose value is an integer that indicates the column in which you want to display an expression. If you do not use the COLUMN option, PUT SCREEN displays the expression at column 1. If you specify a COLUMN that is outside the screen area, the AVM disregards the PUT SCREEN statement.ROW expressionThe row in which you want to display an expression. In the ROW option, expression is a constant, field name, variable name, or expression whose value is an integer that indicates the row you want to display an expression. If you do not use the ROW option, PUT SCREEN displays the expression at row 1. If you specify a ROW that is outside the screen area, the AVM disregards the PUT SCREEN statement.A constant, field name, variable name, or expression that results in a character string. The character string can contain control characters and can be as long as you want.The r-putscr.p procedure determines whether a Customer’s current balance is above or below 0. If it is above 0, they have a credit; if it is below 0, they owe money. The label of the balance column is changed based on whether they have a credit or owe money.
DEFINE VARIABLE paid-owed AS DECIMAL NO-UNDO.DEFINE VARIABLE bal-label AS CHARACTER NO-UNDO FORMAT "x(20)".FOR EACH Customer NO-LOCK:paid-owed = Customer.Balance.IF paid-owed < 0 /* Customer has a credit */ THEN DO:paid-owed = - paid-owed.bal-label = "Customer Credit".END.ELSE bal-label = "Unpaid balance".DISPLAY Customer.CustNum Customer.Name paid-owed LABEL " " WITH 1 DOWN.IF Customer.Balance < 0 THENPUT SCREEN COLOR MESSAGES ROW 2 COLUMN 34 bal-label.ELSEPUT SCREEN ROW 2 COLUMN 34 bal-label.END.If the Customer has a credit (balance < 0) the first PUT SCREEN statement displays the value of bal-label (which is Customer Credit) in the same color as you see system MESSAGES (usually reverse video).If the Customer owes money (balance > 0) the second PUT SCREEN statement displays the value of bal-label (which is Current Balance) in normal display mode.
![]()
Values displayed by PUT SCREEN are not the same as values that belong to frames. Thus those expressions can be overwritten by other displays or hides. Ensure that values displayed by PUT SCREEN do not overwrite frame fields that are used later for data entry.
![]()
If you use the PUT SCREEN statement in a procedure that runs in batch or background mode, the AVM disregards the PUT SCREEN statement.
![]()
The HIDE ALL statement clears the entire screen, including any data displayed by a PUT SCREEN statement.
![]()
The Wyse 75 terminal is spacetaking for some COLOR attributes and non-spacetaking for others. This difference interferes with resetting COLOR MESSAGE (non-spacetaking) back to COLOR NORMAL in a PUT SCREEN statement. If you use WHITE instead of NORMAL whenever you reset color attributes back to normal video attributes, the Wyse 75 behaves like other terminals.
![]()
If you use the PUT SCREEN statement to display data in the message area, the HIDE MESSAGES statement does not necessarily clear that data.
© 2012 Progress Software Corporation and/or its subsidiaries or affiliates. |