Bioclinical Data Services Inc.
|
||||||
|
Bioclinical Data Services Inc.
|
|
|||||
|
Question: In our clinical environment, we are trying to emphasize reusable SAS code via the use of %include modules rather than the use of macros. What considerations are important to effectively use %include modules instead of macro modules? Answer: For simplicity let us discuss the use of %includes within directory oriented operating systems (i.e. Windows, UNIX, VMS). Keep the organization simple. Since you are not using macros, you lose the convenience of an automated "module finder" with the use of the SAS autocall system option. Maintain these modules either (a) in the same directory as other SAS source modules or (b) as children of the current directory. In this way, you can avoid hardcoding the physical path that points to the module. Instead, use relative references to the %includes. In this way, one can move the entire directory structure as needed without destroying the pointers to these %includes. If you choose to keep the %includes in the same directory as the other source modules, use a different extension such as ".inc" to differentiate them from our SAS source modules. Typically three major categories of % includes will emerge:
Place common code for constants and system options in a file in which each program calls at the start of each program (i.e. %include "init.inc" ) This will greatly reduce the maintenance load as all programmers on the team can be "on the same page." Also, executing of this module can allow you to refresh the environment every time the program is run. This is a nice feature particularly if you run jobs in display manager. Remember, %includes should be rigorously tested just as if you were validating any other SAS program or macro. Since these modules are often copied into a number of programs, an error can ultimately cause erroneous output in many programs.Finally, document these modules in a directory file in which entries are listed alphabetically and contains a brief description of the file. If the number of entries is quite extensive, you may consider organizing the directory list alphabetically within function. |
|
|
|
Each client's environment is unique. As a result, we tailor all our programming services and select those technologies that are most appropriate for the client. |