How to Split Output Datasets Based on Where Criteria in SAS ODA – Demonstration
Channel: Monika Wahi
Date: 29/12/2021

*Note: I may be compensated, but you will not be charged, if you click on the links below.

💡 If you are a public health practitioner looking for a targeted program for enhancing your data science skills, please sign up to participate in my 30-minute market research interview so I can get your feedback: https://buff.ly/3UnLqmq

In this video, Monika Wahi shows you how to read in a SAS dataset, then split it into a bunch of different output datasets based on WHERE criteria placed on one of the variables.

GITHUB
Access code and dataset here: https://buff.ly/3xxhcEB 

If you need to know how to import the dataset and map LIBNAME X, watch this video: https://youtu.be/mHhT0Bs4Rmo

COURSE & BOOK
💿Want to start using free, online SAS OnDemand for Academics – but don’t know how? Take Monika’s FREE online course, “Getting Started with SAS OnDemand for Academics (ODA): https://buff.ly/3CQVPxG 
📀Want to run a SAS data warehouse? Learn how by reading Monika’s book, “Mastering SAS Programming for Data Warehousing”: https://buff.ly/31Hz1mg  

WANT TO SUPPORT MONIKA ON SOCIAL MEDIA?
❤️Subscribe to Monika's YouTube channel: https://buff.ly/2W6ijuc   
🧡Follow/connect with Monika on LinkedIn: https://www.linkedin.com/in/dethwench/ 
💛Follow Monika on Twitter: https://twitter.com/PHExaminer 
💚Try Monika’s courses on LinkedIn Learning: https://buff.ly/2Ihd4Rq 
💙Try Monika's boutique research methods and data science courses here: https://buff.ly/3zM243P 

Timestamps for easy navigation:
00:48 Watch this video to learn how to map a LIBNAME and import a SAS dataset into SAS ODA: https://youtu.be/mHhT0Bs4Rmo
00:56 Explanation of the data processing steps we are doing
01:12 This is the code, but it was run before the video started so we could look at the output datasets from it
01:23 Examining the columns in the output datasets on data tab/window
01:43 Explanation of use-case in a real data warehouse
02:16 Explanation of splitting an annual dataset into monthly datasets conditioned on a value of a variable in the dataset
02:42 Explanation of data and set command in data step
03:04 List of conditionals in the code (if/then statements)
03:40 The code is error prone because it is necessary to type a lot of repeat names of variables
04:03 Running code and reviewing resulting datasets landing in the X folder