Get column value from column name

Get column value from column name

There are times when we need to use the attributes like the column value from the column name or format of a variable within a data set. The VValue and Vvaluex functions can be used to return the format and/or value of a variable or a string within the data step.

Creating a custom sort order in SAS

Creating a custom sort order in SAS

Sometimes, we prefer to sort variables manually with a custom sort order rather than alphabetically or Numerical sequence.The first solution is to create user-defined formats that map the DelayCategory to a number that represents the order in which the records will appear.

Check if a Specified Object Exists

Check if a Specified Object Exists

Often Programmers are required to find if an object exists in SAS for validation or to execute certain codes dynamically. This article will help you to find if a specific object exists in SAS. The types of objects include datasets, external files, open libraries, file references, macros, macro variables, formats, informats, and specific variables in a dataset.

6 methods to reorder Variables in SAS Data Set

6 methods to reorder Variables in SAS Data Set

In SAS, the order of variables in a data set is based on the order in which the variables were created. There are several reasons you may want to reorder variables names in a SAS data set. You can change the position of a variable in a SAS dataset with any of the following statements. ATTRIB, ARRAY, FORMAT, INFORMAT, LENGTH, and RETAIN.

Count of missing and nonmissing values for each variable in a SAS data set

Count missing and Non-missing values for each variable – In SAS, we often need to get the count of missing and non-missing values in a SAS dataset. The code used in this example uses PROC FORMAT to create the format for character and numeric variables to be either “non-missing” or “missing” and then use that format with PROC FREQ.

How to create folders using SAS?

How to create folders using SAS?

To create folders in SAS, there are a variety of system options, functions, and commands that you can use.  These tools can be automated to perform repetitive routine tasks and which avoid manual work and save a great deal of time.