A library of SAS Examples.
Have something to add? Just fork it, change it, and create a pull request!
Have comments, questions, suggestions? Just use the issues feature here in github
Each subfolder contains a project. Each project has its own readme file and folder structure. Some projects will reference other projects for components.
The folder structure for this repository is:
- Repository
- Project
- Readme file
Example.sas
file/Macros
Folder
- Project
I built these projects using my local PC based install of SAS. For this reason the file references are windows format. To replicate my setup on your machine you can store this repository in:
C:\PROJECTS
To move this project to another operating environment or path you need to change any paths defined by libname
and filename
statements. I store any hardcoded paths at the top of .sas
files. I never hardcode paths inside of macros.
As shown in the Layout section, macros are stored in subfolders named /Macros
. To make these available to a SAS session these folders can be setup as autocall locations. In the Organizing and Using SAS Macros repository there is a macro, %define_autocalls
, that makes this easy. To use this macro, manually add the location of the /Macros
folder for Organizing Macros so that it can be called for the entire C:\PROJECTS
folder structure.
Add these lines to the users autoexec.sas file:
options sasautos=("C:\PROJECTS\Organizing-and-Using-SAS-Macros\Macros" SASAUTOS);
%define_autocalls(C:\PROJECTS,SUB=Y);
- Disproportionality Measures with SAS: PRR, RR, IC, EBGM (MGPS) and more
- Organizing and Using SAS Macros: workflow and macros for macros
- PROC MCMC Notes: Key links and notes for all versions of PROC MCMC
- This moved to its own repository (link updated)
- Update .sas files when data moves: Coming Soon: Automatically update all of your .sas files so they work when you move your data source(s)
- Coming Soon:
- Log Parsing: Coming Soon! How to examine logs for code efficiency opportunities
- Proc FCMP: Coming Soon! The power to build your own functions
- Parallel Computing and Threading in SAS: Coming Soon! How to create parallelism and trigger threading in your code
- SAS Connect & SAS Grid Manager: Coming Soon! Running Jobs and steps in parallel with just a few coding skills
- Threading in SAS Procs: Coming Soon! Unlocking the power of threading in SAS Procedures
- Proc DS2: Coming Soon! Add threading to your data step
- SAS Viya Data Step: Coming Soon! Automatic threading of SAS Data Steps!!
- ODS Notes and Default SAS Output Across Versions and Interfaces: Coming Soon!
- Using GitHub with SAS - My Workflow(s): Coming Soon!
- New Log Parser that keeps code and notes. Along with plots for investigation.
- Data Masking Code and Studio Task - add to GitHub
- Learn Bayesian methods by simulation
- Proc MCMC from Python
- P-Value versus CI versus Credible Intervals
- Job that edits Jobs
- How to use MPCONNECT
- How ODS Works
- top tips for simulation and debugging