Password Protecting SAS datasets Password Protecting SAS datasets means using access control on your data to prevent unintended access and secure your data. SAS has provided three levels of Access controls over the data and is implemented using passwords. Those access controls are read-write and alter. Passwords are hierarchical in terms of gaining access. For…
PROC PRINTTO procedure is used to redirect log output and procedure output to files or printers. To save the output in an external file, specify the external file or the fileref in the PROC PRINTTO statement. Syntax: PROC PRINTTO <options>; Options in Proc Printto LABEL= It provides a description for a SAS log or procedure…
PROC SUMMARY in SAS procedures allows us to explore our data not only in terms of counts and distributions but also statistically. Syntax: PROC SUMMARY DATA=libref.filename options; BY (or CLASS) variable-list; ID variable-list; VAR variable-list; TYPES variable-list; WAYS n; OUTPUT OUT=libref.filename(options) output statistic=variable-list/options; RUN; Options (partial list): 👉 MISSING – Treat missing values as a…
There are many scenarios where you may need to know the metadata of a SAS dataset. It is always essential to understand fully and explore the inputs to SAS-created output. There are various possibilities in determining the position of variables or columns (and other essential details comprising metadata) in SAS. Below are some of the…
SCAN and SCANQ split strings into words. Both functions are similar. However, the SCANQ function has some additional features, and there is a difference in the default delimiter used in these two functions.…
The INDEX function is used to search for a specified string of characters. If any match is found, INDEX function returns 0 or the position of the first occurrence of the string’s first character.…
While working on arrays in SAS, we may need to sort the array in ascending or descending order. In this post, I will demonstrate different methods and techniques you can use to sort an array in SAS.…
A box plot (also known as box and whisker plot) is a type of chart often used in descriptive data analysis to visually show the distribution of numerical data and skewness by displaying the data quartiles (or percentiles) averages. Box plots show the five-number summary of a set of data: the minimum score, first (lower)…
SAS Length Function: LENGTH is a character function in SAS used to find the length of the character string. There are 4 variations available in SAS to find the length of a string. These are the LENGTH, LENGTHN, LENGTHC and LENGTHM. The primary objective of all the length function is to return the length of the string however there are few variations in how these functions work and return the length.…