BookmarkSubscribeRSS Feed
kruzewski
Calcite | Level 5

I am trying to return a plan file for a query in SAS...How do I take the results and through it into some type of sas object or txt file????

3 REPLIES 3
shivas
Pyrite | Level 9

Hi,

Try this...Hope it helps..

proc printto log='output-file.txt' ;

run;

options fullstimer;

/*SAS Code or Passthrough code*/

  proc printto;

run;

Thanks,

Shiva

kruzewski
Calcite | Level 5

This will only print the log with SAS's execution times, etc... I am trying to get the plan from the DB by using something similar to the below

proc sql;

     connect to netezza as dbcon

          (server=netezzaServer database=myDB authdomain=netezzaAuth);

               execute(

                                   EXPLAIN SELECT

                                        <insert fancy sql code here>

                              );

quit;

Tom
Super User Tom
Super User

Does NETEZZA have syntax for outputting the result of EXPLAIN  into a dataset?  For example with Oracle you can somethings format things as queries from the special null dataset called DUAL.

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
  • 499 views
  • 0 likes
  • 3 in conversation