09-26-2017 11:44 PM
I have autoexec.sas program which contains all libraries,global macro variables and database connections.
and have nearly 80 %include statements which points to diffirent unix paths which having .sas files and formats.
I am re writing the code, so pleae suggest how can I improvise my process to avaoid so many %include statements.
09-27-2017 01:56 AM
09-27-2017 02:54 AM
It is considered best practice these days to set up data sources / libraries in SAS metadata using SAS Management Console. Using the metadata approach gives you the ability to manage permissions more effectively than by just relying on OS permissions.
09-27-2017 02:14 AM
For files containing macros, consider using the autocall facility.
For other includes, put them in one location; this will not reduce your number of %include's, but will make maintaining them easier in the future.
Having lots of %include*s in the autoexec is not that bad; consider having to put them manually in each program you run. It's better to maintain them in one single file. If you don't want the code to clutter up your logs, consider using the nosource option temporarily while the autoexec executes.
09-27-2017 03:55 AM
Why don't you combine some of the files you're including so that you've got 1 file for libnames, 1 for global macro declarations, 1 for format locations etc? It would be much easier to maintain and make your autoexec easier to follow.
09-27-2017 11:04 AM
If you don't like to see a large number of %include in your Autoexec you could make one %include file that calls the others. Just document it:
/* The following include file calls a number of other program files to reduce size of autoexec file*/