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
'프로그래밍 > SQL, Hive, SAS 관련 정보' 카테고리의 다른 글
[SQL 기초] Oracle DB환경 (3) | 2024.10.24 |
---|---|
[SQL/Oracle] 문자열 칼럼 Pivot (0) | 2022.01.23 |
[SAS] Calculated 함수 (0) | 2021.11.20 |
[SQL] Subquery 사용 시 주의점 (1) | 2021.11.20 |
[SQL] SQL 행번호 이용 (0) | 2021.11.20 |