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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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