Chapter Contents

Previous

Next
ERRORON

ERRORON



Sets the error flag for one or more FRAME entry controls or fields

Category: Control or Field


Syntax
Details
Example
See Also

Syntax

ERRORON wcol-names |_ALL_;

wcol-names
specifies one or more window variables for which to turn on the error flag, or _ALL_ to turn the error flag on for all window variables.

Type: Character


Details

To set an error flag for multiple fields, specify the field names following ERRORON, separated by blanks. To set an error flag for all fields in the window, use the following statement:

erroron _all_;

To clear the error flag for one or more fields, use ERROROFF (see the preceding entry).

In SAS program entries, ERRORON causes the SCL program to execute when a user presses any key the next time the window is displayed. Any fields for which the error flag is set are marked as modified regardless of whether or not the user has changed the value in the field.

In FSEDIT applications where a field is placed in error with ERRORON, a user can enter a new value and the error status is removed from the field and reset if the error condition is still met. In SAS/AF applications where a field is placed in error with ERRORON, entering a valid value is not enough to remove the error flag. You must use ERROROFF.

The FRAME entry control or field cannot be an element of an array. To set the error flag for an array element, use FIELD instead.

FRAME entry controls can also use the _erroron method.


Example

Suppose your application manipulates a SAS table that contains information about employees and the number of hours they work each week. Because only weekly personnel are paid for overtime, the application should verify that all employees who have reported overtime hours are weekly employees.

if (weekly='N' and overtime>0) then
   do;
      erroron overtime;
      _msg_=
     'Only weekly personnel can have overtime.';
      return;
   end;

See Also

CONTROL

DISPLAYED

ERROR

ERROROFF

FIELD


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.