Skip to content
rawfocus edited this page Jun 16, 2015 · 3 revisions

Mandatory Standards

  • All macros should use keyword (not positional) parameters. This allows for easier extension of functionality.
  • Lines should be kept within 80 characters (avoids needs to scroll left and right)
  • Files should have unix (LF) endings. Unix files will open in Windows, but not vice-versa
  • One macro per .sas file
  • The .sas filename should be the same as the macro name (mymacro.sas contains %mymacro)
  • All filenames should be in lowercase (mymacro.sas, not MyMACRO.sas)
  • If changed (and appropriate), system options should be returned to original settings
  • All local macro variables should be local in scope (%local)
  • Indentation should be 2 spaces. No TABS should be used (they render differently in different editors)
  • All filepath slashes should be unix style (/) as these can be used in all operating systems

** Recommended Standards**

  • Avoid spaces around equal signs - (var1=x & var2=y) is more concise than (var1 = x & var2 = y)

FOLDERS Macros are categorised as follows:

  • function: No SAS code is actually generated
  • windows: Windows specific macros

DOCUMENTATION The macro header comments should follow the guidance on the following page: https://github.com/sashub/macro/wiki/Documentation

Clone this wiki locally