DATA Step, Macro, Functions and more

call execute, suppress "generated line" in the log

Accepted Solution Solved
Reply
Contributor ckx
Contributor
Posts: 63
Accepted Solution

call execute, suppress "generated line" in the log

When you run "call execute" it prints the SAS syntax generated to the log. Usually that's wonderful but if not, is there a way to suppress this information, similar to "options nomprint"?


Accepted Solutions
Solution
a week ago
Super User
Super User
Posts: 9,384

Re: call execute, suppress "generated line" in the log

You can do something like this:

options nosource;
data _null_;
  set sashelp.class;
  if _n_=2 then call execute(cat('data want; set sashelp.class; where age=',strip(age),'; run;'));
run;
options source;

View solution in original post


All Replies
Solution
a week ago
Super User
Super User
Posts: 9,384

Re: call execute, suppress "generated line" in the log

You can do something like this:

options nosource;
data _null_;
  set sashelp.class;
  if _n_=2 then call execute(cat('data want; set sashelp.class; where age=',strip(age),'; run;'));
run;
options source;
Contributor ckx
Contributor
Posts: 63

Re: call execute, suppress "generated line" in the log

Thanks for the very quick reply, it works brilliantly!

Valued Guide
Posts: 556

Re: call execute, suppress "generated line" in the log

Use option in call execute. NOMPRINT


data _null_;
if _n_=1 then call execute("options nomprint;proc print data=sashelp.class;run;");
run;
Thanks,
Suryakiran
☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 105 views
  • 0 likes
  • 3 in conversation