I hope this is an easy question for sasperts.
I am updating the previous 10 year trend data with new data, to make a new 10 year trend data set.
old data set is indicators2008_2017
adding in data for 2018, so for the new 10 year trend data set, i want the data set to be indicators2009_2018
Is this right?
**** edit Year ******************** ; %let Year = 2018 ; /* these two lines are to identify the previous 10 year data set, that ends with the year -before- "year" and begins with year - 10. For example, when updating with 2018 data, the previous data set was indicators2008_2017 */ %let oldendyr=%eval(&Year-1); %let oldstartyr=%eval(&Year-10);
* AND need the first year of the new 10 year data set, which would be year -9 ; %let newstartyr=%eval(&Year-9);
Then next, I'm trying to bring together the data for the current year with the data with the previous data set. I know this isn't right because I get errors.
data indicators&newstartyr_&Year; set sasout.indicators&oldstartyr_&oldendyr indicators&Year; run;
Here is some output
2836 data indicators&newstartyr_&Year;
(next three lines below under the & symbol)
- 22 200 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, /, ;, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
Help appreciated.
Thanks
... View more