'I am trying to modify and make permanent changes in the SAS data set, but I am not able to do so
I want to make permanent changes is the variable name Fclass and label Date as Departure date. i have used the modify statement along with rename but I am getting error when I am running the program.
proc datasets library= ia;
modify passngrs;
rename FClass= First Class;
label Date='Departure date';
format Date date9.;
run;
Solution 1:[1]
You might want to do any of these:
- Rename to a variable name that does not contain a space
rename FCLASS = FirstClass; - Rename to a trickier name by using session options and a name literal
options validvarname=any; proc ...; ...; rename FCLASS = 'First Class'N; - Use a label for
FCLASSinstead of renaming itlabel FCLASS = 'First Class';
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Richard |
