The SAS data access functions OPEN(), FETCH(), FETCHOBS(), GETVARN(), GETVARC(), ATTRN(), ATTRNC(), VARNAME(), and CLOSE()] are powerful and under-used elements of the SAS programming language, with broad applications in both macro and DATA step contexts.
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.
Arrays in SAS is a temporary grouping of SAS variables that are arranged in a particular order which are identified by an array name.
A table lookup is used to determine the value of a variable in the primary table to determine the value of another variable that is present in a secondary table. There are a number of techniques for performing these table lookups. These techniques can be radically different both in terms of programming complexity and performance….
Combining datasets vertically involves stacking one or more datasets. Before combining datasets It’s important to understand the descriptor portion or structure and contents of your input data sets.
An index in SAS is used to logically sort your data without physically sorting it. If you are sorting and then re-sorting data to accomplish merges, you may find that indexes to be useful. Creating an Index in SAS Indexes are created using PROC DATASETS or through PROC SQL and even they can also be…