SAS Component Language Dictionary |
Assigns a value to up to ten blank variables
Category: |
Control or Field
|
CALL SETFLD(value,variable-1<, . . .
,variable-10>);
|
-
value
-
is the character value to assign.
Type: Character
-
variable-1, . . .
,variable-10
-
are up to ten character variables whose
values you want to change from blank to value.
Type: Character
If the variable is blank, value
is assigned to the variable. No values are changed for variables that are
not blank.
This function is useful for setting the default values
for a series of fields.
Set each of the variables SYM1 through SYM5 to the value -REQUIRED- for each variable that is
blank:
call setfld ('-REQUIRED-',sym1,sym2,sym3,sym4,sym5);
The above statement is equivalent to the following statements:
if (sym1=' ') then sym1='-REQUIRED-';
if (sym2=' ') then sym2='-REQUIRED-';
if (sym3=' ') then sym3='-REQUIRED-';
if (sym4=' ') then sym4='-REQUIRED-';
if (sym5=' ') then sym5='-REQUIRED-';
CLRFLD
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.