DATA Step, Macro, Functions and more

Abort statement not executed

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Abort statement not executed

Hi ,

 

I'm trying to execute below code and unable to run program.

please help me on this .

 

Thanks,

Mahesh .

 

%let flag=False;
%macro checkpoint();

%if %sysfunc(compress(&flag)) ="False" %then %do;
data _null_;
file print;
put "my program going to abort"
run;
%abort ;
%end;

 

%else %if %sysfunc(compress(&flag)) ="True" %then %do;
proc print data=sashelp.class;
run;

%end;
%mend;
%checkpoint;


Accepted Solutions
Solution
2 weeks ago
SAS Employee
Posts: 119

Re: Abort statement not executed

%if &flag=False %then %do;

%else %if &flag=True %then %do;

 

Try formulating your Boolean expressions like this.

 

 

View solution in original post


All Replies
Super User
Posts: 6,971

Re: Abort statement not executed

What did you expect to happen, and what happened instead? Also post the log.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
2 weeks ago
SAS Employee
Posts: 119

Re: Abort statement not executed

%if &flag=False %then %do;

%else %if &flag=True %then %do;

 

Try formulating your Boolean expressions like this.

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 115 views
  • 0 likes
  • 3 in conversation