프로그래밍/SQL, Hive, SAS 관련 정보
[SAS] Macro 변수와 마침표(Period)
물박사의 저장공간
2022. 1. 8. 11:11
SAS 매크로 변수를 사용할 때는 마침표를 찍어주자.
예시)
%let year=2017;
%let filename = &year._accounts.xlsx;
%put &filename;
결과는 : 2017_accounts.xlsx
만약 year뒤에 마침표를 찍어주지 않았다면 매크로변수인 year_accounts를 찾으려고 할 것이고 에러가 발생
출처: Stackoverflow
https://stackoverflow.com/questions/46167502/what-the-last-after-the-macro-variable-mean
what the last "." after the macro variable mean
Below is the code to create the dataset from exisitng datasets, where end and end8, end7 are macro variables, just wondering why add . at the end of the macro variables? data tab4a_&end.; set
stackoverflow.com