SAS Component Language Dictionary |
Changes the name, label, format, or informat of a column in a
SAS table
sysrc=MODVAR(table-id,var-name,new-name<,label
<,format<,informat>>>);
|
-
sysrc
-
contains the return code for the
operation:
0 |
successful |
0 |
not successful |
Type:
Numeric
-
table-id
-
is the identifier that was assigned
when the table was opened. If table-id is invalid,
the program halts.
Type: Numeric
-
var-name
-
is the column whose attribute or
attributes you want to change. The column must already exist in the SAS table.
Type:
Character
-
new-name
-
is the new name to assign to the
column. The value must be a valid SAS name and cannot already exist in the
SAS table.
Type: Character
-
label
-
is the label to assign to the column.
Type: Character
-
format
-
is the format to assign to the column.
Type: Character
-
informat
-
is the informat to assign to the
column.
Type: Character
The table must be opened in UTILITY (V)
mode, or the function halts.
If you do not want to change an argument, insert a null
string (''
) as a placeholder.
Change only the label for the column PHONENUM
in the SAS table CUSTOMR:
dsid=open('customr','v');
if dsid then
do;
rc=modvar(dsid,'phonenum','','Office Phone');
rc=close(dsid);
end;
OPEN
VARFMT
VARINFMT
VARLABEL
VARLEN
VARNAME
VARNUM
VARTYPE
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.