Welcome to 9to5sas

9TO5SAS contains written and illustrated tutorials on SAS programming, data analytics, and statistics. 

How to Copy datasets in SAS?

How to Copy datasets in SAS?

You can use high-level procedures PROC COPY and PROC DATASETS for moving and copying SAS datasets between libraries.They provide much more control over what data sets you want to move and this approach is more efficient.

truncate Decimals in SAS

How to truncate Decimals in SAS?

Sometimes you may need to truncate numeric values to a specified number of decimal places without rounding. In this article, you will learn to truncate decimals in SAS, without rounding.

round numbers in sas

How to Round Numbers in SAS?

The ROUND function rounds the numbers to the nearest multiple of the rounding factor. Round up or ceil in SAS uses ceil() function which rounds up the column in SAS. Round down in SAS or floor in SAS uses floor() function which rounds down.

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.

today's date in SAS

How to get today’s date in SAS?

To get today’s date in SAS, you can either the today() or date() functions. They are equivalent and represents the number of days since January 1, 1960. Datetime() function returns SAS value represents the number of seconds between January 1, 1960, and the current time.

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.

Receive the latest articles in your inbox

Insert your email signup form below

🤞 Don’t miss these tips!

We don’t spam! Read more about our privacy policy.

Copy link
Powered by Social Snap