Use this file- or record-level keyword to specify that your program is to receive control if the workstation user presses the Clear key, and optionally, that the OS/400 program is to set on the specified response indicator.
Refer to Appendix B, System/36 environment considerations for display files, for special considerations when specifying the CLEAR keyword in files that are used in the System/36 environment.
The format of the keyword is:
CLEAR[(response-indicator ['text'])]
The Clear key is processed like a command attention key (no input data is transmitted from the device). The OS/400 program does not clear the display; your program must perform the desired function (such as clearing fields or records from the display).
If you do not specify this keyword and the display station user presses the Clear key, the OS/400 program displays a message indicating that it is not valid at that time.
The optional text is included on the printout created at program compilation time to explain the intended use of the indicator. This text has no function in the file or the program other than as a comment. The apostrophes are required. If you specify more than 50 characters between the apostrophes, the text is truncated to 50 characters on the program printout.
Option indicators are valid for this keyword.
Example:
The following example shows how to specify the CLEAR keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00101A CLEAR(10 'Clear key pressed') A
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.