HomeContact

Latest Posts

11 Financial Formulas In SAS to make your investment decision easier
Most people use Excel to make financial calculations. But SAS is also very capable of helping in…
May 16, 2021
6 min
Determine the log of a variable in SAS
There are multiple logarithmic functions available to determine the log of a variable in SAS. The most used log functions are the natural and common log functions.
March 31, 2021
1 min
Append records to an existing file in SAS
The code illustrates how to append records to an existing file in SAS. It can be used to add text to the bottom of an existing file with the MOD option in the FILE statement.
March 30, 2021
1 min
How to Copy a file with SAS?
Here is an example of a code that you can use to copies a file byte by byte. It copies the content byte-by-byte so it can be used to copy any file, even pictures! This will work on both Unix and Windows and it's great for copying files from your SAS session to a place outside of SAS, or vice versa.
March 09, 2021
1 min
Advanced SAS
SAS Data Access Functions
For the past few years, I've been learning SAS and have found that most of the functions I use are…
Subhro Kar
Subhro Kar
February 13, 2021
5 min
Randomly select character values for each observation
In the example dataset - SASHELP.HEART, you want to create a new variable - Activity_status and assign one of three values of ('High', 'MEDIUM', 'LOW'), at random to each observation. You can achieve these using 2 methods. Method 1: Using an array data heart(drop=id _1-_3 keep=status sex bp_status chol_status activity_status); set sashelp.heart(obs=10); array _{3} $ [...]
February 01, 2021
1 min
Changing the Case of All Character Variables in a Data Set
This program will change the case for all of the character variables in a SAS data set. The key here is using the _CHARACTER_ keyword in the ARRAY statement. This will create an array of all the character variables in the dataset.
January 25, 2021
1 min
Removing dashes and parentheses from phone numbers
Removing dashes and parentheses from phone numbers is one of the common data cleaning activities. This program uses the compress function to remove unwanted characters from a phone number.
January 25, 2021
1 min
Previous
Page 8 of 17
Next
© 2025 9to5sas
AboutContactPrivacyTerms