 Hello, thank you for joining me, Monica Wahee, in your journey as you learn to use SAS On-Demand for Academics, otherwise known as SAS ODA. In this video, I'm going to show you how to import a SAS dataset into the SAS ODA environment. Okay, here we are in the SAS On-Demand for Academics or SAS ODA environment. If you need help setting up your free account in SAS ODA, you can take my free online course called aptly, Getting Started with SAS ODA. I'll link you to it in the description. Okay, so assume you got started with SAS ODA and now you can open a program window. And let's say someone gives you a SAS dataset. Actually, let's say I give you a SAS dataset and tell you to get it into SAS ODA. How do you get it into the environment? Oh, and you can go to a link in the description to get the demonstration dataset. It is called chap8 underscore 1 dot SAS7BDAT. So it's a SAS dataset, meaning the extension is SAS7BDAT. That's what we are trying to get into SAS ODA and actually use. Now the first step is to upload that file into the environment, but I want to be neat. Let me make a folder for it first. I can do that in my instance of SAS ODA by right clicking on files home on the side panel. See that menu? I'm going to choose new and folder. And I'm lazy and I'm just demonstrating. So I'm just going to name it x. So I'll type x and hit save. Okay, there it is. Do you see it? Okay, let's now upload our SAS dataset there. I'm going to click on the folder. Now I'm going to click on this upload button. See that? Then click choose files. Then go find where I downloaded the dataset from GitHub. Okay, here it is. Now we click upload. Okay, there it is. See it in the x folder. All right, now the dataset is in there. So the next thing we have to do is come up with a way to tell SAS how to refer to it. With that, we are using a libname. Okay, we are going to map the libname x to that folder we just made named x. How we do it is we use the libname command, then we put x for the folder name, and then we put the path. But that path in there from the GitHub code isn't right. I'll show you how to update it. First we'll start by right clicking on the x folder. We will choose properties at the bottom. Okay, see here in this box where it says location. See that path? That's what you want. Let's highlight and copy that. Then close. Okay, now we will paste that path in where it says this old my folders path in the code. Okay, now when we run that code, it should map the libname to x. Then in the next code, we have a data step. Remember the syntax? We start with the data command, which declares our output data set. Notice we are calling our output data set brfss underscore a, because I took these data from the behavioral risk factors railing system data set. And then you will see this is followed by a set command declaring our input data set. This is where the x comes in. See the libname is placed before the name of the data set? So it's x.chap8 underscore 1. That's how you can refer to it. So SAS is going to copy that data set and put it where? Well, not in x. That's because we don't have a libname before the name of our output data set. This is a trick question on purpose. The default libname where there is no libname is SAS's own internal special working memory library called work. If you want to learn more about the work library, go ahead and take my free online course in SAS ODA. Since the work directory is really important in data warehousing, I cover this issue extensively. Okay, the last command we have is a run statement. So what this code should do is map the libname x, then copy the SAS data set we put in x into the work directory. Let's run this and see what happens. Hey, it looks good. Let's look in the log. Attention, attention. SAS has a note for us. Note. For 38,901 observations, read from the data set x.chap8 underscore 1. The data set work.brfss underscore a has 38,901 observations and 12 variables. I love that note. That's the kind of stuff it says in SAS when your data gets in there right. Hey, if you always want to get love letters from SAS and your log files, take my free online course on how to use SAS on demand for academics. All these lessons are based on my riveting, your thoughtful book, Mastering SAS Programming for Data Warehousing. I'll link to these in the description. Thanks for watching and have a peachy day.