Hi,
I'm trying to write some code that will scan pseudo sas code stored in a mapping sheet which merges or concatenates data sets.
In example 1 I want to see if there is "data" followed by "merge" and "run".
The lines "ANY TEXT..." just mean that any other code or text may be present in those lines.
Thanks.
****example 1****
ANY TEXT DKASJLFLDLSAJFKLDFJD;
DATA NEW;
MERGE DSONE(IN=A) DSTWO(IN=B);
RUN;
ANY TEXT DKASJLFLDLSAJFKLDFJD;
In example 2 I want to see if there is "data" followed by "set" followed by at least 2 data sets, and want to ignore the (in=) parts.
****example 2****
ANY TEXT DKASJLFLDLSAJFKLDFJD;
DATA NEW;
SET DSONE(IN=X) DSTWO(IN=Y) DSTHREE;
RUN;
ANY TEXT DKASJLFLDLSAJFKLDFJD;
In example 3 I want to see if there is "proc sql" followed by "join" and "quit"
****example 3****
ANY TEXT DKASJLFLDLSAJFKLDFJD;
PROC SQL;
select customers.city, sales.totals
from sales natural inner join customers
where country='United States';
QUIT;
ANY TEXT DKASJLFLDLSAJFKLDFJD;