diff --git a/README.md b/README.md index 684911b..f98ba8e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Macro Core -Much quality. Many standards. The **Macro Core** library exists to save time and development effort! Herein ye shall find a veritable host of MIT-licenced, production quality SAS macros. These are a mix of tools, utilities, functions and code generators that are useful in the context of Application Development on the SAS platform (eg https://datacontroller.io). [Contributions](https://github.com/sasjs/core/blob/main/CONTRIBUTING.md) are welcomed. +Much quality. Many standards. The **Macro Core** library exists to save time and development effort! Herein ye shall find a veritable host of MIT-licenced, production quality SAS macros. These are a mix of tools, utilities, functions and code generators that are useful in the context of [Application Development](https://sasapps.io) on the SAS platform (eg https://datacontroller.io). [Contributions](https://github.com/sasjs/core/blob/main/CONTRIBUTING.md) are welcomed. You can download and compile them all in just two lines of SAS code: @@ -9,7 +9,7 @@ filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas"; %inc mc; ``` -Documentation: https://sasjs.github.io/core.github.io/files.html +Documentation: https://core.sasjs.io # Components @@ -84,7 +84,7 @@ filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas"; ## File Properties - filenames much match macro names -- filenames must be lowercase +- filenames must be lowercase, without spaces - macro names must be lowercase - one macro per file - prefixes: @@ -99,7 +99,7 @@ filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas"; - unix style line endings (lf) - individual lines should be no more than 80 characters long - UTF-8 -- no trailing white space + ## Header Properties @@ -136,13 +136,15 @@ When contributing to this library, it is therefore important to ensure that all ## Coding Standards - Indentation = 2 spaces. No tabs! +- no trailing white space +- no invisible characters, other than spaces. If invisibles are needed, use hex literals. - Macro variables should not have the trailing dot (`&var` not `&var.`) unless necessary to prevent incorrect resolution -- The closing `%mend;` should not contain the macro name. +- The closing `%mend;` should **not** contain the macro name. - All macros should be defined with brackets, even if no variables are needed - ie `%macro x();` not `%macro x;` - Mandatory parameters should be positional, all optional parameters should be keyword (var=) style. - All dataset references must be 2 level (eg `work.blah`, not `blah`). This is to avoid contention when options [DATASTMTCHK](https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000279064.htm)=ALLKEYWORDS is in effect. - Avoid naming collisions! All macro variables should be local scope. Use system generated work tables where possible - eg `data ; set sashelp.class; run; data &output; set &syslast; run;` -- If you have a long-running SQL query, the use of a `quit;` statement is recommended in order to benefit from the timing statistics. +- The use of `quit;` for `proc sql` is optional unless you are looking to benefit from the timing statistics. # General Notes