i am facing a problem as I tryiing to make a string by using SAS Macro and SAS functions but am not able to deal with parentheses as a string. Don't know what to do. Can someone please help me with this. My Code : %MACRO MA_STRING(D,N) ; %LET MA_STRING = %NRSTR(sum%() ; %PUT &MA_String ; %DO I = 1 %TO &N ; %LET MA_STRING = %SYSFUNC(CAT(&MA_String ,%STR(,) , LAG , &I , %Str(%() , &D , %Str(%)) )); %PUT &MA_String ; %END ; %MEND ; %MA_STRING(P,3) ; This is the error received. sum( ERROR: Required operator not found in expression: ) sum(,LAG1.P) ERROR: Required operator not found in expression: sum(,LAG1.P) ERROR: Required operator not found in expression: ) sum(,LAG1.P),LAG2.P) ERROR: Expected close parenthesis after macro function invocation not found. LAG , 3 , ( , P , ) ))
... View more