Chapter Contents

Previous

Next
ERROROFF

ERROROFF



Clears the error flag on one or more FRAME entry controls or fields

Category: Control or Field


Syntax
Details
Example
See Also

Syntax

ERROROFF wvar-names |_ALL_;

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

Type: Character


Details

An error flag can be set either by attributes that are assigned to fields or FRAME entry controls, or by the ERRORON statement.

Use the following statement to clear the error flag for all FRAME entry controls or all fields in the window:

erroroff _all_;

Statements in MAIN do not execute by default if a field is placed in error. Therefore, use a CONTROL statement that specifies the ERROR option to enable ERROROFF to remove the error flag.

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

FRAME entry controls can also use the _erroroff method.


Example

If a user enters an invalid value in the field TABLENAME, this SAS/AF program resets the value of TABLENAME to the default and turns off the error flag. The field TABLENAME is assigned type INPUT, so the procedure checks to see whether the SAS table exists when a user enters a value for TABLENAME.

INIT:
   control error;
return;
MAIN:
   if (error(tablename)= 1) then
      do;
         tablename='my.default';
         erroroff tablename;
      end;
return;

See Also

CONTROL

DISPLAYED

ERROR

ERRORON

FIELD


Chapter Contents

Previous

Next

Top of Page

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