Its not entirely clear to me what you are trying to achieve. From that snippet of code, it looks like you are taking one item from a dataset, and then putting that into a macro variable, which you are then inserting into a dataset? This really can't be the best way to achieve your end result. SAS provides much functionality for merging, setting, updating data, so why try to code it by hand? Just from what I can see there (and you have not provided any test data/required output so its just guess work);
data test;
merge master dep_rate_data_0002 (where=(account="&v1.") keep=beta_up);
run;
Should work, or if the variable exists, use update or sql insert. Plenty of options. Avoid using global macro variables, its bad practice and can lead to very hard to debug issues (as global affects the whole session).
... View more