Use this record- or field-level keyword with the OVERLAY keyword so that
the OS/400 program does not delete data already on the display when displaying
a record again. The PUTOVR keyword has a function similar to, but more
effective than, PUTRETAIN.
This keyword has no parameters.
To understand what effect this keyword has on output operations, consider
the following sequence of steps:
- Your program sends an output operation to RECORD1, displaying
RECORD1. PUTRETAIN, if in effect, is ignored. Any data in the
record area for RECORD1 is deleted before RECORD1 is displayed.
- At some later time, with RECORD1 still on the display, your program sends
a second output operation to RECORD1. Two conditions can occur:
- If the PUTRETAIN keyword is not in effect, the OS/400 program first
deletes the record area for RECORD1, then displays RECORD1. Fields
selected for display at this time are displayed with new data contents and new
display attributes, which can be the same as before. The record area
includes every line on which a field or part of a field for RECORD1
appears.
- If PUTRETAIN is in effect, the OS/400 program does not delete the record
area for RECORD1. The data contents of selected fields are not
changed. However, the display attributes for selected fields are sent
to the display and can be changed (by selecting which DSPATR keyword is in
effect for this output operation). Fields not selected for display are
written over character-by-character by fields selected for display.
(For more information, see When Fields Are Selected by Option Indicators for Display Files.)
- Note:
- When using the field-level PUTRETAIN keyword, the entire record area is
deleted if none of the fields in the record has PUTRETAIN optioned on.
If you specify at least one field with unoptioned field-level PUTRETAIN
keyword, this ensures that the record area is not deleted.
If you specify the PUTRETAIN keyword, 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.
Option indicators are valid for this keyword.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.