/*If i have to pull out strings like below from a complete log file - do we have any method to do it?
NOTE: The data set work.test has 100 observations and 10 variables.
NOTE: The data set market.test2 has 500 observation and 50 variables.
*/
/*just a thought*/
filename logfile 'c:\test.log';
%let a=work | market;
%let b=any character;
%let c=any number;
%macro check;
if string in : ("NOTE: The data set &a.&b &c &b &c &b") then
do;
data test;
length string $100;
infile logfile;
string="NOTE: The data set &a.&b &c &b &c &b";
run;
proc sql;
select loginfo into :string separated by ' ' from test;
quit;
end;
%mend;
%check;
/*thanks*/
Hi:
I'm not sure you have the macro code correct. Your macro variables are not doing what you think they are going to do. Try this test:
%let a=work | market;
%let b=any character;
%let c=any number;
%macro check;
%put NOTE: The data set &a.&b &c &b &c &b;
%mend;
%check;
and then look in the SAS log (see screen shot). Have you tried to actually RUN your code???? Your IF statement is incorrect.
cynthia
Cynthia - i mentioned in my comment that this is just thought - I am not expert at all on macro, i am at very beginning stage in macro as well as SAS. I just wanted to know if somehow we can pull those particular strings
(
NOTE: The data set work.test has 100 observations and 10 variables.
NOTE: The data set market.test2 has 500 observation and 50 variables.
)
from log.
- Thanks for your time!!!
If the goal is to create a summary of "net data sets created/modified" by the current program, then perhaps you could instrument your program for this. Here's an approach that uses the data table datetime stamp to detect which tables were modified after a given point in time (captured at the program start):
Make sense?
Chris
WOW Chris
...
...
this is awesome...This will definitely help. I didn't think someone would come up with just 2 steps to fulfill this requirement.
Thanks a lot...!!! i really appreciate your time...!!!
I will drop unwanted variables from "net_tables"...
- Thanks Again Chris.
- Thanks ALL for your time and comments.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.