DATA Step, Macro, Functions and more

syserrortext macro variable

Reply
New Contributor
Posts: 2

syserrortext macro variable

Hi everyone,

How to clear syserrortext macro vaiable?

data se%;

test = "&syserrortext";

run;

DATA SE%;

      
              22
              200

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, /, ;, _DATA_, _LAST_, _NULL_. 

ERROR 200-322: The symbol is not recognized and will be ignored.

this is correct for resolving macro,

data  clear;

sett="&syserrortext ";

run;

proc sql;

select count(*)  into : error from clear;

run;

%macro test;

%if &error >0 %then %do;

data test;

set sashelp.class;

run;

%end;

%else %if &error=0 %then %do;

Successfully Generated;

%end;

%mend;

%test;

here , syserrortext affecting second program

data set;

set sashelp.class;

run;

data  clear12;

sett="&syserrortext ";

run;

proc sql;

select count(*)  into : error from clear;

run;

%macro test;

%if &error >0 %then %do;

data test;

set sashelp.class;

run;

%end;

%else %if &error=0 %then %do;

Successfully Generated;

%end;

%mend;

%test;

please help me, to clear syserortext macrovaribale.

Thanks in advance

Ask a Question
Discussion stats
  • 0 replies
  • 574 views
  • 0 likes
  • 1 in conversation