Date: Tue, 20 Jun 2006 12:40:47 -0700
Reply-To: "Terjeson, Mark (IM&R)" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark (IM&R)" <Mterjeson@RUSSELL.COM>
Subject: Re: %include & Log Messages
In-Reply-To: A<1150830931.479955.69410@r2g2000cwb.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
OPTION SOURCE2;
will turn include code logging on, and
OPTION NOSOURCE2;
will turn it off.
Hope this is helpful.
Mark Terjeson
Senior Programmer Analyst, IM&R
Russell Investment Group
Russell
Global Leaders in Multi-Manager Investing
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
chandu.isi@GMAIL.COM
Sent: Tuesday, June 20, 2006 12:16 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: %include & Log Messages
Hi All,
Is there any way to get the program statements with the NOTES
to SAS LOG file for a program which is included using %include
statement?
Example 1 : In general the log looks like this-
/**
The code is:
data one;
input a b;
cards;
1 2
;
data two;
set one;
run;
*/
80 data one;
81 input a b;
82 cards;
NOTE: The data set WORK.ONE has 1 observations and 2 variables.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.01 seconds
84 ;
85
86 data two;
87 set one;
88 run;
NOTE: There were 1 observations read from the data set WORK.ONE.
NOTE: The data set WORK.TWO has 1 observations and 2 variables.
NOTE: DATA statement used:
real time 0.03 seconds
cpu time 0.01 seconds
Example 2: With %include.
/**
The code is
filename temp 'H:\Tutorials\SAS';
*libname crao 'H:\Tutorials\SAS\';
%include temp(test1.sas);
data crao.test2;
set crao.test;
run;
Note : Here test1.sas is a sas program just to create a dataset in crao
folder.
*/
And the looks like this:
64 filename temp 'H:\Tutorials\SAS';
65 *libname crao 'H:\Tutorials\SAS\';
66 %include temp(test1.sas);
NOTE: Libref CRAO was successfully assigned as follows:
Engine: V8
Physical Name: H:\Tutorials\SAS
NOTE: The data set CRAO.TEST has 3 observations and 2 variables.
NOTE: DATA statement used:
real time 0.00 seconds
cpu time 0.00 seconds
76
77 data crao.test2;
78 set crao.test;
79 run;
NOTE: There were 3 observations read from the data set CRAO.TEST.
NOTE: The data set CRAO.TEST2 has 3 observations and 2 variables.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.01 seconds
Here My Question is: Is there any command/a way to get the data step sas
statements( from test1.sas- along with NOTE statements) between line 66
and 76?
Thanks in Advance.
Chandu.