How to read what's sent via proc sql?

Reply
N/A
Posts: 0

How to read what's sent via proc sql?

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;
Valued Guide
Posts: 2,106

Re: How to read what's sent via proc sql?

The option you are looking for is called MPRINT.
N/A
Posts: 0

Re: How to read what's sent via proc sql?

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
Frequent Contributor
Posts: 91

Re: How to read what's sent via proc sql?

try adding the PROC SQL feedback option to your code rather than MPRINT.

like:
proc sql feedback;
/* etc */

or use options symbolgen.
N/A
Posts: 0

Re: How to read what's sent via proc sql?

more details are available.
They are documented with the SAS/Access products

iirc
option SASDtrace

but be wise and look it up

PeterC
Post a Question
Discussion Stats
  • 4 replies
  • 391 views
  • 0 likes
  • 3 in conversation