SAS is aware of the F5 security incident and is in contact with F5. We have followed all F5 recommended guidance and will continue to monitor the situation moving forward.
%STR
특수문자나 공백을 다룰 때 사용하는 매크로입니다.
STR은 String의 약자로 매크로 프로세사가 특수문자가 명령어가 아닌 일반 텍스트로 처리하도록 만든 함수입니다.
SAS에서는 특수문자가 명령어로 인식됩니다.
; (세미콜론) : 문장 끝
+, - : 연산자
, (쉼표) : 매개변수 구분
() (괄호) : 함수 또는 표현식
■ ;(세미콜론) 을 문장 끝으로 인식한 경우
%LET text = a;b;c;
%PUT &text;
text에 문자열 a 만 할당되어 b, c 문자는 tet에 할당되지 않습니다.
또한, 유효한 syntax가 아니기 때문에 오류가 발생되어 로그에 표시됩니다.
■ ;(세미콜론) 을 문자열로 인식하는 방법
%LET text = %STR(a;b;c);
%PUT &text;
;(세미콜론) 이나 따옴표(" " ' ')와 같은 특수문자가 포함되어 있을 경우
Macro Quoting 인 괄호 ( ) 를 활용해 괄호 안에 있는 텍스트를 문자열로 취급할 수 있게 합니다.
■ 등호(=) 표시를 문자열로 인식하는 방법
방법1)
%LET equation = x=15;
%PUT 방정식: &equation;
위 %LET 문에서 매크로와 관련된 특수문자( ; , "") 등이 포함되지 않았습니다.
매크로 관련 특수문자가 포함되어 있지 않기 때문에 Macro Quoting(매크로 인용) 없이도 x = 15 자체가 문자열로 인식할 수 있습니다.
방법2)
%LET equation = %STR(x=5);
%PUT 방정식: &equation;
■ 공백까지 문자열로 인식하는 방법
%LET text1 = 안녕하세요;
%PUT [&text1];
SAS 매크로 변수에 값을 할당할 때에는 텍스트의 양쪽 끝에 있는 공백을 자동으로 제거합니다.
%LET 문으로 변수에 공백까지 넣었던 경우 공백은 사라집니다.
%LET text2 = %STR( 안녕하세요);
%PUT [&text2];
%LET text3 = %STR(안녕하세요 );
%PUT [&text3];
공백을 문자처럼 인식하기 위해서 %STR 문을 활용합니다.
%STR은 괄호 안의 모든 문자를 그대로 텍스트로 인식할 수 있게 합니다.
... View more
Hello,
I am using SAS VIYA LTS 2025.03.
I have a number of large tables in CAS and I need to insert the content into DB2 tables. The tables can not be moved from CAS to SPRE because some of the columns are quite large and will get truncated (these large columns correcpond to BLOB and CLOB Db2 data types)
Has anyone accomplished this before?
Thank you,
Smm662002
... View more
%EVAL
SAS 매크로 중에서 %EVAL 은 정수의 사칙 연산과 비교 연산( >, <, ≤, ≥, ≡, ≠) 하는데 사용하는 매크로입니다.
소수점 계산은 불가능하며 결과값은 텍스트로 출력됩니다.
■ 사칙연산 예시
%LET x = 3;
%LET y = 5;
%LET sum = %EVAL(&x + &y);
%PUT 합계는 &sum 입니다.;
%LET문을 활용해서 값을 할당했습니다.
X = 3, Y = 5로 값을 할당했습니다.
&기호는 매크로 변수를 참조하는 기호로 맨크로 변수값을 사용할 때는 & 기호를 붙여 사용합니다.
%EVAL 문으로 사칙연산을 실행합니다. 정수 연산만 가능하고 소수점 연산일 경우에는 %SYSEVALF를 사용합니다.
%PUT 문으로 SAS 로그에 메시지를 출력할 수 있습니다.
■ 참조) %SYSEVALF(소수점 연산)
%LET x = 3.5;
%LET y = 5.2;
%LET sum = %SYSEVALF(&x + &y);
%PUT 합계는 &sum 입니다.;
%LET x = 3.5;
%LET y = 5.2;
%LET sum = %EVAL(&x + &y);
%PUT 합계는 &sum 입니다.;
EVAL 문으로는 소수점 연산이 불가능합니다.
■ 비교 연산 예시
비교연산의 경우 매크로 조건문 내에서 논리적인 조건을 평가할 때 사용하므로, %IF-%THEN-%DO와 같은 매크로 조건문과 함께 사용됩니다.
두 매크로 변수 (&score, &points)값을 비교하는 예제입니다.
&score 값은 90, &points 값은 85로 저장되었습니다.
%IF-%THEN-%DO 매크로 조건문과 비교 연산 매크로 %EVAL을 사용해서 score 변수와 points 변수 값을 비교하였습니다.
%LET score = 90;
%LET points = 85;
%IF %EVAL(&score = &points) %THEN %DO;
%PUT 동일합니다.;
%END;
%ELSE %DO;
%PUT 상이합니다.;
%END;
... View more
SAS Content Assessment 2025.10 was released on October 16! Enhancements in this release include:
A new application—detect duplicate SAS content—is provided in this release. This application finds duplicate SAS programs and data sets.
A new application—create SASXFER packages —is provided in this release. This application creates SAS Transfer (SASXFER) packages from SAS Content Assessment data.
The SAS 9 Inventory report has been enhanced. It includes SAS Content Assessment release information and application execution times.
System evaluation collects SAS configuration files in its results for SAS Technical Support analysis.
Enhancements have been made, performance has improved, and issues have been addressed across the applications.
... View more
Hi everyone! Maybe exist a way to disable the autogenerated variables when a user executes a task in SAS Studio? We want to avoid this: We appreciate the support you can provide us!
... View more
Take the stage at SAS Innovate 2026! We're looking for outcome-driven, demo-ready presentations that spark curiosity and deliver impact. Share your proposal by November 7.