SAS Component Language Dictionary |
Reports whether a FRAME entry control or field contains an invalid
value
Category: |
Control or Field
|
-
rc
-
indicates whether the FRAME entry control
or field in the window is in error:
1 |
in error |
0 |
not in error |
Type:
Numeric
-
wvar-name
-
is the name of a FRAME entry control or
field in the window. This argument cannot be an expression.
Type: Character
Use ERRORON and ERROROFF to set and reset error conditions
for the FRAME entry control or field.
The FRAME entry control or field cannot be an element
of an array. To report this information for an array element, use FIELD instead.
FRAME entry controls can also use the _inError
method.
Specify the CONTROL statement with the ERROR option
in the INIT section of the program. The statements in the MAIN section are
submitted only if the FRAME entry control OBJ1 is not in error.
INIT:
control error;
return;
MAIN:
if (error(obj1)=0) and obj1 NE _blank_ then
submit continue;
proc print data=&obj1;
run;
endsubmit;
else
_msg_='Nothing submitted. Please correct error.';
return;
The following sequence generates a compile error because
the variable DS is not a window variable but contains the name of a window
variable. ERROR expects to be passed the window variable itself.
ds='tablename';
if (error(ds)) then
do;
...SCL statements to handle the error condition...
end;
DISPLAYED
ERROROFF
ERRORON
FIELD
MODIFIED
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.