SAS: How to Calculate Age from Date Of Birth in SAS

In SAS, dates are stored in numeric and days are calculated by considering the default cut off date which is January 01, 1960 and the date specified. When you’re dealing with SAS dates and calculating time or days, the cut off date is very important. To calculate age you need two values, the first is … Read more

INTCK Function: DISCRETE and CONTINUOUS Methods in SAS

The INTCK function in SAS returns the number of interval boundaries that lie between two SAS dates, times, or timestamp values. It’s a super powerful function in SAS which is being used widely when calculating date intervals between two dates. Syntax of INTCK function: INTCK(interval , start-date-time, end-date-time, <'method'>) INTCK(interval , start-date-time, end-date-time, <‘method’>) method: … Read more

DROP v/s DELETE in SAS

The basic SQL concept is still the same in SAS. The DELETE statement deletes only the rows (data) in a table. The DROP TABLE statement removes the table from the database completely, including the table structure. DELETE Statement in SAS This is the most commonly used statement to remove a few, specific groups of observations, … Read more

How to recover damaged SAS Data set (using PROC DATASETS REPAIR)

You might have encountered the following error when loading, updating to re-creating a sas data set.  “File WORK.XXXX.DATA is damaged. I/O processing did not complete” ERROR: File OLRSAS.RESULT.DATA is damaged. I/O processing did not complete. This is a most common situation where you need to repair a damaged data set: A system failure occurs while … Read more