Tag Archives: SAS Programming

The today() function of SAS programming is basically used to generate current date. The format() function is used to display the format of the date… Read More
Generally, when we import data from external sources such as Excel/CSV files, it loads additional rows that are totally blank. Sometimes empty values in the… Read More
The COALESCE function is employed to pick the first non-missing value in a list of variables. In other words, it returns the first non-blank value… Read More
COMPRESS function is basically used to compress/removes all the spaces/blanks in a character string. In other words, it removes leading, between and trailing spaces from… Read More
Informats is used to tell SAS how to read a variable whereas Formats is used to tell SAS how to display or write values of… Read More
The WHERE statement is a substitute to IF statement when it comes to subsetting a data set. Syntax: WHERE (condition is true) => It refers… Read More
Entering Data Directly: You can enter numbers of lines of data directly in SAS program by using a DATALINES statement. The keywords are as follows:… Read More
Comparison Operators used while using conditional statements. Symbol Mnemonic Meaning = EQ equals ^= or ~= NE not equal > GT greater than < LT… Read More
This topic is regarding how to drop variables from a dataset in SAS. It includes various methods to delete variables from data. In SAS, there… Read More
LIKE Operator: Pattern Matching The LIKE operator used to select data by comparing the values of a character variable to a specified pattern. It is… Read More
IS MISSING Operator: Selecting Missing Values Task 1: Suppose you want to select only those observations in which students did not fill their section information.… Read More
PROC IMPORT: It is a procedure to import external files into SAS. It automates importing process. There is no need to specify the variable type… Read More
Suppose you have a list of variables. You don’t want to type the name of each variable every time to define them within the function… Read More
BETWEEN-AND Operator: Between Two Numbers Task 1: Suppose you want to select scores whose values are greater than or equal to 50 and less than… Read More
This will help you to create or modify a variable. It is common to define a new variable based on the existing variable. Let’s create… Read More