BookmarkSubscribeRSS Feed
Gopisankarmg
New User | Level 1

Hi team, 

Sometimes I notice that while I work on some macros for quite sometimes, even if the codes compile without error, SAS suddenly stops printing the results tab but only print the codes on log? i.e. codes are working but it wont print the results 

I have to restart the SAS to get out of this. Is it because of a missed ; or %mend somewhere which results it this? Is there a one stop solution without having to restart the session? 

for example- see the copied codes- this was running successfully without errors but not showing the results of the print until i restarted the session..


62 %choice(Status=PAID, course=C001)
MPRINT(CHOICE): data fees;
MPRINT(CHOICE): set certadv.all;
SYMBOLGEN: Macro variable STATUS resolves to PAID
SYMBOLGEN: Macro variable COURSE resolves to C001
MPRINT(CHOICE): where paid="Y" and course_code ="C001";
MPRINT(CHOICE): keep student_name course_code begin_date totalfee paid ;
MPRINT(CHOICE): if location= "Boston" then totalfee=fee*1.06;
MPRINT(CHOICE): else if location = "Seattle" then totalfee=fee*1.025;
MPRINT(CHOICE): else if location = "Dallas" then totalfee =fee*1.05;
MPRINT(CHOICE): run;

NOTE: There were 3 observations read from the data set CERTADV.SCHEDULE.
WHERE Course_Code='C001';
NOTE: There were 207 observations read from the data set CERTADV.STUDENTS.
NOTE: There were 327 observations read from the data set CERTADV.REGISTER.
WHERE Paid='Y';
NOTE: There were 1 observations read from the data set CERTADV.COURSES.
WHERE Course_Code='C001';
NOTE: There were 55 observations read from the data set CERTADV.ALL.
WHERE (paid='Y') and (course_code='C001');
NOTE: The data set WORK.FEES has 55 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.06 seconds
cpu time 0.01 seconds


SYMBOLGEN: Macro variable SYSLAST resolves to WORK.FEES
MPRINT(CHOICE): proc print data=WORK.FEES (obs=5);
MPRINT(CHOICE): title "Status";
MPRINT(CHOICE): run;
NOTE: There were 5 observations read from the data set WORK.FEES.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 secondsMPRINT(CHOICE): title;

 

 

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 62 views
  • 0 likes
  • 1 in conversation