jam
jam

Reputation: 567

'Header' File in SAS?

Is there a way to run a sas program with an external 'header' file (similar to python? For example, in python I can put 'import var_names.py' at the top of main.py, and change what I want in var_names.py instead of having to alter main.py. Is there something similar for SAS? Thank you!

Upvotes: 0

Views: 372

Answers (1)

user667489
user667489

Reputation: 9569

It sounds as though you are looking for the %include statement.

Official documentation:

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a000214504.htm

You can also re-use code in various other ways, e.g. by defining macros and saving them to an autocall folder, saving formats to catalogues, and custom data step functions (via proc fcmp).

Upvotes: 1

Related Questions