-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mastering SAS Programming for Data Warehousing
By :
Now that we have planned our analytic dataset, we will prepare our transformation code. First, we will deal with creating categorical grouping variables such as agrp from _AGE80. Next, we will clean up the continuous variable SLEPTIM1 into a new transformed variable, SLEPTIM2. We will go on to make indicator variables where needed, as we have planned for vetflag. Finally, we will talk about how dates and numerical values can be used as indexes in SAS data warehouses, and then we will demonstrate exporting the transformed dataset.
Earlier, we presented our plan for coding agrp from _AGE80. Let's start our transformation code by making agrp:
We will start by copying our demonstration dataset Chap7_1 from LIBNAME X to the WORK directory and naming it brfss_a.
In the data step, we will add agrp using if/then statements.
We will then output the brfss_b dataset.
We will follow this operation...