BookmarkSubscribeRSS Feed
deleted_user
Not applicable
There is a way to see on the log what's sent via proc sql? What is the option that I have to put?

For an example, if I run the folloowing,

%let obsn=5;

proc sql;
connect to oracle (user=&user1 pass=&pass1 path=odin);
create table id_data as
select * from connection to oracle
( select *
from id_details
where rownum < &obsn);
disconnect from oracle;
quit;


I want to see the following on the log:

proc sql;
connect to oracle (user=myusername pass=mypassword path=odin);
create table id_data as
select * from connection to oracle
( select *
from id_details
where rownum < 5);
disconnect from oracle;
quit;
4 REPLIES 4
Doc_Duke
Rhodochrosite | Level 12
The option you are looking for is called MPRINT.
deleted_user
Not applicable
Hi Doc@Duke,

I'm also seeing the following:
MPRINT(MYQUERY): ;
MPRINT(SPEED1): data space.mydata
MPRINT(SPEED1): set
MPRINT(FILENAMES): speed_data_1
MPRINT(SPEED1): speed_data_2;
MPRINT(SPEED1): run;

I only want to see the one that was sent to proc sql. I rem seeing it somewhere...I can't recall the option name.

Thanks for the reply.

-Nilan
advoss
Quartz | Level 8
try adding the PROC SQL feedback option to your code rather than MPRINT.

like:
proc sql feedback;
/* etc */

or use options symbolgen.
deleted_user
Not applicable
more details are available.
They are documented with the SAS/Access products

iirc
option SASDtrace

but be wise and look it up

PeterC

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!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

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