BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

Hello,

 

I am using a proc sql into: statement similar to the following one:

 

PROC SQL NOPRINT;

SELECT EMPID, DIAG

INTO :EMP_LIST, : DIAGLIST

FROM MASTER;

QUIT;

%PUT &EMP_LIST &DIAGLIST;

 

 

However, I receive a warning statement such as: WARNING: No output destinations active.

Is there a way to avoid this warning statement?

 

Regards,

Alain

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

How do you submit that code? If from a EG code node, please post the whole log of the node.

 

Because I just ran this for testing:

ods _all_ close;

proc sql noprint;
select name into :names separated by ',' from sashelp.class;
quit;

%put &names;

and it worked:

27         ods _all_ close;
28         
29         proc sql noprint;
30         select name into :names separated by ',' from sashelp.class;
31         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

32         
33         %put &names;
Alfred,Alice,Barbara,Carol,Henry,James,Jane,Janet,Jeffrey,John,Joyce,Judy,Louise,Mary,Philip,Robert,Ronald,Thomas,William

Only when I removed the noprint from the proc sql statement did I get the WARNING.

View solution in original post

6 REPLIES 6
Amir
PROC Star

Hi,

 

Do you have noprint in your original proc sql?

 

Can you see the result of the %put statement?

 

 

Regards,

Amir.

 

PaigeMiller
Diamond | Level 26

Show us the SASLOG

--
Paige Miller
Kurt_Bremser
Super User

How do you submit that code? If from a EG code node, please post the whole log of the node.

 

Because I just ran this for testing:

ods _all_ close;

proc sql noprint;
select name into :names separated by ',' from sashelp.class;
quit;

%put &names;

and it worked:

27         ods _all_ close;
28         
29         proc sql noprint;
30         select name into :names separated by ',' from sashelp.class;
31         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

32         
33         %put &names;
Alfred,Alice,Barbara,Carol,Henry,James,Jane,Janet,Jeffrey,John,Joyce,Judy,Louise,Mary,Philip,Robert,Ronald,Thomas,William

Only when I removed the noprint from the proc sql statement did I get the WARNING.

SuryaKiran
Meteorite | Level 14

What client application are you using EG or Studio or PC SAS? If your running the code in EG without NOPRINT and you don't have any output destination mentioned then you might get this warning.

 

In EG go to Tools>Results>Results Formats>Check one here.

 

image.png

Thanks,
Suryakiran
Ksharp
Super User

It is weird. I never get this sort of WARNING after running your code.

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 6 replies
  • 6298 views
  • 0 likes
  • 6 in conversation