02-11-2015 03:36 AM
I am new to SAS world and wanted to know, how to run one SAS code file by calling it from another SAS code file. None of them are macro. I know one option is by %INCLUDE but wanted to see some better option where I can also pass on some variable values to called SAS file.
02-11-2015 03:41 AM
%include is the method to use, and values for parametrization can be passed as macro variables. Macro variables are also the method how parameters are fed to stored processes.
02-11-2015 04:57 AM
Could you clarify the part about " better option where I can also pass on some variable values to called SAS file ". The reason I ask is that SAS code files are text files. Now in the additional step of the macro pre-processesor, all %include statements are replaced by the text found in the respective file. Therefore it is the full text which is sent to the compiler, there are no "parameters" created/passed. So please describe a bit more what your attempting to do.
%include is the best method to include other programs, though a cursory mention should be given to reading a file in an infile and then generating code from it.