I'm trying to create a main SAS program that will run different SAS programs if the criteria fits.
For example
if this condition then do;
%include "sas programs\myfolder\compliance.sas" ; run;
else
%include "sas programs\myfolder\rates.sas; run;
How can I pass parameters to these programs?
What is in the program files? Is anything set up to accept parameters? What types of values need to be set as parameters?
As much as practical the best way is to place values in data sets in a library other than WORK. Reasons here are so you have the data sets in case of a crash (a very common problem when learning macro coding). Another is that values in a data set can be used with CALL Execute and may obviate the need for separate macros as call execute also builds SAS code statements.
Or do you mean that those scripts have macro definitions that you want to use? If that is the case then %include the files before use so they are available (or investigate SAS Autocall library in documentation). Then add statements to use the macros.
Details missing so pretty generic response.
I figured it out thank for your help
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.