PROC SUMMARY In SAS

The PROC SUMMARY procedure is used to explore and analyse data not only in terms of count and distribution but also statistically. The SUMMARY and PROC MEANS are quite a similar SAS procedures with two minor differences. The first difference is, PROC MEANS prints a report by default, whereas PROC SUMMARY does not. And the … Read more

SAS: How to Convert Character Date to Numeric Date in SAS

In this article we have already seen how you can convert char variable to numeric and numeric variable to character variable. When it comes to DATE in SAS, it’s a bit different because SAS has its own date format and informats. You can use the INPUT() function to convert a character date to a numeric … Read more

SAS: How to Use Datalines Statement (Cards/Lines) to Create a SAS Data set

The Datalines statement along with the INPUT statement is used to create a data set from scratch by entering data directly in the program, rather than data stored in an external file. You can use only one DATALINES statement in a DATA step. Use separate DATA steps to enter multiple sets of data. Basic Syntax … Read more

PROC SQL: How to ALTER table and UPDATE columns in SAS Data Set

The ALTER TABLE statement is used to add new variables, delete existing variables, or modify format of variables.  This method gives you more flexibility while adding new variables or modifying existing ones. It is also possible to add values on those newly added columns with UPDATE TABLE statement. The following example demonstrates that two new … Read more

How to Convert ALL Character Variables into Numeric Variables in SAS Data set

You have a SAS data set with few numeric variables and most of them are character variables. Now you want to convert those character variables into numeric variables in the SAS data set.  In this article we have covered how to convert numeric variables into character variables and vice versa. In this article you’ll learn … Read more

How to Convert Character to Numeric Variable in SAS

In this article we’re going to deep dive into the most common question from SAS users. I’m sure you also have the same question on how to convert variable values from character to numeric in SAS. On multiple occasions you do need to perform the data value conversion especially when you’re reading data from different … Read more

SAS: How to Calculate Age from Date Of Birth in SAS

In SAS, dates are stored in numeric and days are calculated by considering the default cut off date which is January 01, 1960 and the date specified. When you’re dealing with SAS dates and calculating time or days, the cut off date is very important. To calculate age you need two values, the first is … Read more

#10 SAS Studio Tricks You Should Know Today

SAS Studio is getting more popular than ever since it has launched. This is because of the boom in cloud technology and upcoming web migration. The SAS Studio bundled with the SAS Viya is the perfect solution delivered by SAS and they are making improvements with each patch or a new version.  You may have … Read more