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

Hi,

 

One quick question. If I write 'no print' after 'proc sql', will run time be reduced? 

 

For example: table1 is an intermediate table that I am not going to save in any folder, but will be used for later data procedures. 

 

Initially, 

Proc Sql;

       Create table table1 as select * from work.table 

       Where ...;

Quit;

 

Then,

Proc Sql noprint;

       Create table table1 as select * from work.table 

       Where ...;

Quit;

 

 

Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

No, I don't think so.  NOPRINT affects SQL operations that don't create/update a data set.  In those cases, the result is sent to ODS output.

 

If you use CREATE TABLE, then NOPRINT is a "no op".

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

No, I don't think so.  NOPRINT affects SQL operations that don't create/update a data set.  In those cases, the result is sent to ODS output.

 

If you use CREATE TABLE, then NOPRINT is a "no op".

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
s_lassen
Meteorite | Level 14

The NOPRINT option in proc SQL is mostly used when doing a SELECT INTO, that is you use a query to create macro variables, e.g.

proc sql noprint;
  select distinct age into :ages separated by ',' 
  from sashelp.class;
quit;

In this case, you are doing a SELECT statement that does not create a table; that would normally produce a print. But you just want the ages listed in the macro variable AGES, so you use NOPRINT to bypass the print.

If no print would be generated anyway, then the NOPRINT option has no effect.

Kurt_Bremser
Super User

Aside from the good answers you already got, what keeps you from using options fullstimer; and run a series of tests on your own?

 

See Maxim 4.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 25168 views
  • 0 likes
  • 4 in conversation