Use this record-level keyword to permit the override of either display attributes or data contents (or both) of specific fields within a record displayed on a workstation device. By using PUTOVR, you can reduce the amount of data sent to the display device.
See the Application Display
Programming
book for information on how to use PUTOVR in files that are used in the
System/36 environment.
This keyword has no parameters.
If you use the PUTOVR keyword and subfiles, certain restrictions
apply. See the Application Display
Programming
book for more information about these restrictions.
When selected fields in a record that has already been displayed are to be changed, an output or an output/input operation sent to the record with the PUTOVR, OVRDTA, and OVRATR keywords in effect changes only the fields for which the OVRDTA or OVRATR keyword is in effect. The OVRDTA keyword permits a change in the data contents of the field and the OVRATR keyword permits a change in the display attributes of the field. The way in which fields are to be changed is controlled by setting option indicators.
The following conditions cause the Put-Override keywords to be ignored and no error to occur:
The PUTOVR and OVRDTA keywords must be specified when DFT is specified for a named output-capable field. When the PUTOVR and OVRDTA keywords are both in effect for a field, the default value specified with the DFT keyword is displayed only on the first display of the field. On subsequent displays with the PUTOVR and OVRDTA keywords in effect, the program value is displayed.
If a field is not displayed on the first output operation to a record format, certain restrictions could apply. These restrictions apply when, on a subsequent output operation, the field is selected for display and the put-override keywords are also in effect:
The PUTRETAIN keyword and the PUTOVR keyword cannot be specified on the same record format.
The OVRDTA keyword is permitted only with output-only, output/input, program-to-system, or message fields (usage O, B, P, or M, respectively).
The OVRATR keyword is permitted only with output-only, input-only, or output/input fields (usage O, I, or B, respectively).
If you specify PUTOVR, you should also specify RSTDSP(*YES) on the Create Display File (CRTDSPF) or Change Display File (CHGDSPF) command. Otherwise, data on the display can be lost if the file is suspended.
A warning message is sent at file creation time if the PUTOVR keyword is specified on a record with the DSPMOD keyword. At run time, the PUTOVR keyword is ignored when the display mode changes.
The OVRATR keyword can be used only to override the following display
attributes:
CHECK(ER)
CHECK(ME)
DUP
DSPATR (all except OID and SP)
An output operation with the OVRDTA keyword in effect does not need to have the OVRATR keyword in effect to override display attributes, as well as data contents, of the field or fields being overridden.
Option indicators are valid for the PUTOVR, OVRATR, and OVRDTA keywords.
Example:
The following example shows how to specify the PUTOVR, OVRATR, and OVRDTA keywords.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R INVRCD PUTOVR 00020A FLD1 1 26'INVENTORY REMAINING IN WAREHOUSE 1' 00030A* 00040A 3 2'Remaining on hand:' 00050A OVRATR 00060A 11 DSPATR(HI) 00070A* 00080A INVBAL 5Y 0 +2 00090A 12 OVRDTA 00100A* 00110A +2'Low on stock' OVRATR 00120A N70 DSPATR(ND) 00130A 70 DSPATR(HI) 00140A* 00150A SUPPPL 20 B 5 2DFT('INTERNAL') 00160A 13 OVRDTA 00170A* 00180A ACCT 20 6 2OVRDTA 00190A DSPATR(HI) 00200A 14 DSPATR(RI) A
An initial output operation generates a full display of information; on a second output operation, PUTOVR is in effect and the program can set option indicators to make the following changes to the display:
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.