How To Print All The Datasets From A SAS Library

The PROC PRINT procedure is usually used to view dataset observations in SAS. You need to specify the dataset name with data=option in the proc print procedure. Here is a simple example of how to print a dataset in SAS.  Basic Syntax: proc print data=data-set-name;run; Here is the sample example to print sashelp.class dataset. /* … Read more

PROC PRINT In SAS (With 10+ Examples)

You can use the PROC PRINT procedure to print observations in a SAS data set using some or all of the variables. It’s one of the oldest yet relevant SAS procedures which is being used widely. With the new more advanced procedure like PROC REPORT, ODS system, PROC PRINT kind of left behind in the … Read more

PROC TABULATE In SAS (With 15+ Examples)

The TABULATE procedure displays descriptive statistics in tabular format, using some or all of the variables in a data set. You can create a variety of tables ranging from simple to highly customised. The PROC FREQ, PROC MEANS, and PROC REPORT generates the statistical results but with the restricted output datasets. PROC TABULATE produces high … Read more

PROC TRANSPOSE In SAS (With 10+ Examples)

With the PROC TRANSPOSE procedure you can create an output data set by restructuring the values in a SAS data set, transposing selected variables into observations. Usually datasets are structured but sometimes you may get the data in different formats, depending on how data is being collected at source. There are other external factors such … Read more

How To Compare (matching/non-matching) Rows From SAS Data sets

You can compare and find the matching and non-matching rows from two datasets in SAS using data merge technique. In the data merge technique data step statement is used with merge statement. In this method you can compare multiple datasets by listing them after the MERGE statement and create new datasets for matching and non-matching … Read more

PROC COMPARE In SAS [Complete Guide With 10+ Examples]

The COMPARE procedure compares the contents of two SAS data sets, selected variables in different data sets, or variables within the same data set. PROC COMPARE compares two data sets: the base data set and the comparison data set. The procedure determines matching variables and matching observations. Matching variables are variables with the same name … Read more

How To Compare Two Tables In SAS

You can easily compare two tables in SAS using different methods. Comparison can be done on sampled data or the entire datasets. The following methods can be used to compare two tables by identifying matching, non-matching, and common observations from both the datasets. PROC SQL DATA MERGE PROC COMPARE The following two sample datasets will … Read more

How To Delete External Files If It Exists Using SAS Code

This is a very common operation performed in data management. When it comes to deletion of files it is always recommended to have file check logic in place before you attempt to delete files. You can delete files using the FDELETE() function. But before that you must verify if a file exists or not using … Read more

Difference Between DELETE and DROP In SAS

DELETE vs DROP In SAS As a general concept DELETE keyword delete rows from the SAS dataset. It means it only removes observations from the dataset and structure or metadata of that dataset remains intact. Whereas DROP keyword delete entire dataset by physically deleting data files, metadata files and index files if it exists. There … Read more

How To Delete SAS Data sets (5+ Examples)

It’s always the best practice followed that beforeing creating or loading SAS dataset you should first check if it already exists and delete SAS data sets. It’s a standard procedure. There are multiple ways you can delete SAS data sets. You can either delete or drop the dataset. It works more or like the same. … Read more