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

#10 SAS Studio Tricks You Should Know Today

SAS Studio is getting more popular than ever since it has launched. This is because of the boom in cloud technology and upcoming web migration. The SAS Studio bundled with the SAS Viya is the perfect solution delivered by SAS and they are making improvements with each patch or a new version.  You may have … Read more

How to Extract Last 4 Digits From A Numeric Variable in SAS

In SAS you can easily extract characters from a string using SUBSTR() or SUBSTRN() functions. But it only works with the character variable. To extract last 4 digits or any number of digits from a numeric variable, you need to convert the input from numeric variable to character variable in order to use substr function. … Read more

5 Reasons Why You Should Learn Data Analytics

Data analytics has already got momentum and going forward it will be the core of countless new technology solutions.  It is being increasingly leveraged by startups, small businesses, and large enterprises to improve customer experience, reduce cost and make existing processes faster. Data is the new fuel and AI is the accelerator! Though even if … Read more

How to Populate Current Date and Datetime in SAS

You can easily populate the current date and datetime in SAS using today() and datetime() functions. More specifically, current date can be populated using today() function and date with time can be populated using datetime() function. We’re going to use the work data set “work.hightemp” to insert a new variable “date_now” with current date or … Read more

How to Print Data values into the SAS Log

SAS internally generates logs while executing SAS statements and writes them into the SAS LOG window or any specified external log file. The level of logging depends on the SAS system configuration or SAS options specified in the SAS program itself. But none of them prints actual data into the log window or log file.  … Read more