Hi all,
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.
Thanks,
Gaurav
%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.
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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.