Stop SAS Macro on Error
This tutorial explains how to make SAS stop macro execution on error. It is one of the most common task in building a macro. For example, you are building a macro for SAS users who are beginners. You...
View ArticlePROC SQL : ALTER TABLE and UPDATE COLUMN
This tutorial explains how to add or delete columns in a table and update column values with PROC SQL.The ALTER TABLE statement is used to add new columns, delete existing columns or modifying the...
View ArticlePROC SQL : INSERT INTO
This tutorial explains how to insert or add rows in the same table. It can be easily done with INSERT INTO statement of PROC SQL.Create a datasetdata temp;set sashelp.class;run;1. Insert Rows based on...
View ArticleSAS : Convert Character Variable to Date
This tutorial explains multiple ways we can convert character variable to SAS date.Suppose you encounter a problem in which you need to convert character variable to SAS date format. It happens most of...
View ArticleAdvanced SAS Interview Questions and Answers
Knowing SAS is an asset in the job market as it holds largest job market share. I have listed down most frequently asked Advanced SAS Interview Questions and Answers. It covers topics on PROC SQL, SAS...
View ArticleCount and Percentage in a Column Chart
This tutorial explains how to create a column chart in which we can show both values and percentages.Value and Percentage in Same Column ChartTaskSuppose you are asked to show both frequency and...
View ArticleSAS Visual Analytics : Convert Numeric Variable to Date
This post describes how to convert a numeric variable to date format in SAS Visual Analytics.TaskSuppose a variable having date information is classified as a measure (numeric) variable type in SAS...
View ArticleRemove blank rows and columns in SAS VA Table
This post describes how to edit or resize a table in SAS Visual Analytics. By default, SAS Visual Analytics adds unnecessary rows and columns in table. We generally need to remove these blank rows and...
View ArticleSAS Visual Analytics : Add Column Percentage in CrossTab
This article explains how to add column percentage in crosstab in SAS Visual Analytics.TaskSuppose you have created a cross tab - variable1 by variable2. You want to show both frequency and count % of...
View ArticleRead ZIP or GZ Files in SAS
This tutorial describes how to read or unzip .ZIP or .GZ files in SAS. When i tried to unzip files in SAS first time, i struggled a lot. It's a little bit tricky to read .GZ files into SAS...
View ArticleSAS : Read Character Variable of Varying Length
This tutorial demonstrates how we can read or import data with a character variable of varying length. We generally encounter this situation when we have company names or both first and last names of a...
View ArticleAvoid Truncation in PROC IMPORT
This tutorial explains how to stop truncation in character variables while importing CSV or Tab files with PROC IMPORT. It is a common issue when your CSV file has a character variable having...
View ArticleWhen to use IF and %IF in SAS Macros
Most of the programmers who are new to SAS macro programming are confused between the IF condition and %IF in SAS Macros. The usage of DO END and %DO %END in macro programming also creates confusion....
View ArticleHow to deal insignificant levels of a categorical variable
This tutorial describes how to interpret or treat insignificant levels of a independent categorical variable in a regression (linear or logistic) model. It is one of the most frequently asked question...
View ArticleWrite VBA in SAS
This tutorial explains how we can write Visual Basic for Application (VBA) code in SAS. VBA is a programming language for automating repetitive tasks in MS Excel and other MS Office applications. It is...
View ArticleSAS : Add leading zeros to Variable
This tutorial describes how we can add leading zeros to a numeric or character variable in SAS. It's one of the most frequently encountered data problem. It generally happens when we have some product...
View ArticleR : Add Linear Regression Equation and RSquare to Graph
In this article, we would see how to add linear regression equation and r-squared to a graph in R. It is very useful when we need to document or present our statistical results. Many people are...
View ArticleRun VBA in R
This tutorial describes how to run Visual Basic (VBA) script in R.VBA in RMost of the times, we need to integrate R with Excel to make formating changes in excel workbook. With VBA, we can do a lot of...
View ArticleSAS : Custom Sort Order
In this tutorial, we will cover how to apply custom sort order in SAS.Custom Sort Order in SASMost of the times, we want to sort variables manually with a custom sort order instead of alphabetically....
View ArticleSAS : Converting Number Format to Date Format
This tutorial focuses on converting a number format variable to a date format variable.Convert Number Format to Date FormatSuppose you have a numeric variable that contains dates. You are asked to...
View Article