BookmarkSubscribeRSS Feed

November 2024

Started ‎11-21-2024 by
Modified ‎11-21-2024 by
Views 813

To view this email in your web browser, click here.

happythanksgivingpilgrim.png

Holidays are extra fun in the SAS Support Community thanks to a member who posts themed visualizations using SAS ODS Graphics. Find out how to create a 5-polygon pilgrim hat like the one pictured above. 

Dear Reader:

With Thanksgiving a week away here in the U.S., it’s fitting to give thanks for all you SAS customers, partners and advocates. We at SAS appreciate you! And we take seriously our part in setting you up for success. 

It never ceases to amaze me how so many of you go above and beyond to equip one another to win with SAS. Evidence abounds on the SAS Support Communities, in regional and in-house user groups, even on social media. As I was compiling this edition, I ran across this terrific LinkedIn post by Oluwaseun Eyebiokin, who uses SAS in clinical statistics. In it, he highlights some of his favorite resources for getting up to speed on SAS. Don’t miss the comments section of his post – and consider adding your favorites there! 

Meanwhile, scroll down to see the latest tips and tricks and much more.

Happy reading!

Bev Brown
Editor, Tech Report

Someone forwarded you this edition of Tech Report? Subscribe to receive your own copy each month!

Tech tips with Chris

Tech_Tips_With_Chris.png

Sorting Data in SAS: When It’s Necessary and When It’s Not

Sorting data is a fundamental operation in SAS, especially for tasks like BY group processing. However, it’s important to recognize when sorting is essential and when it can be avoided to save on expensive I/O operations.

Sorting data is an I/O-intensive operation. It involves reading data from storage, sorting it, and writing it back, which can be time-consuming and resource-heavy, especially with large datasets. Here are some tips to mitigate the cost: 

  • Minimize Sorting: Only sort data when absolutely necessary. Evaluate if the operation can be performed without sorting. 
     
  • Use Indexes: Where possible, use indexes to speed up data retrieval and processing. (Note that indexes can take a long time to build, so this is best for data that doesn’t change often.) 
     
  • Leverage Database Capabilities: Offload sorting and grouping operations to the database when working with large datasets stored in relational databases. 

Many DATA step operations require sorted data, such as: 

  • Merging Datasets: When merging datasets using a BY statement, both datasets must be sorted by the BY variables. 
     
  • First. and Last. Variables: To correctly identify the first and last observations in a BY group, the data must be sorted. 
     
  • Retaining Values: When using the RETAIN statement to carry forward values within BY groups, sorting is crucial. 
     
  • Lag Functions: Functions like LAG require sorted data to correctly reference previous observations within groups. 

So, when can you skip the SORT? 

  • If you feel the need for speed and you don’t mind some advanced coding, the DATA step hash object offers some amazing performance benefits for transforming your data. 
  • When your data is in a relational database, SAS will automatically push an “ORDER BY” directive to the database when using a SAS procedure with a BY group. This saves you from having to explicitly sort the data first! 
  • Many SAS procedures support a CLASS statement that produces results that are like those from a BY statement. CLASS statements generally don’t need sorted data to produce categorized results. Check the SAS doc for options! 

Let’s hear from you! What’s your favorite technique for saving time and disk space in your SAS programs? Let me know!

​​​​​​​​​​​​​​Tips & tricks

Tips & Tricks Header

Watch two new tutorials to sharpen your SAS Viya Workbench skills

Get up to speed on SAS Viya Workbench with two new videos: Modifying the SAS Autoexec File and Connecting to GitHub. Can't access YouTube? No worries! The SAS Viya Workbench Quick Start playlist is also available on the SAS Video Portal

Find out how to transpose data so it fits your analysis needs

In Part 6 of the "Manipulating Data in Base SAS®" blog series, SAS’ Mark Jordan demonstrates two powerful tools SAS programmers can use to transpose data: PROC TRANSPOSE and DATA step with arrays and DO loops and contrasts the pros and cons of each technique.

Try %getattribs for easy variable-attribute conversions

Need to convert variable attributes of a SAS data set? Turn them into attribute code you can use in DATA Step and DS2 with a single macro variable? SAS’ Stu Sztukowski shows you how.

Get the basics on SAS Decision Builder

What is SAS® Decision Builder? Who should use it? What are typical use cases? SAS' Kumar Thangamuthu answers these and other questions in this SAS Community Library article.

Learn to use the Azure Service Principal to access DataBricks from SAS Viya

The SAS Viya platform supports the Service Principal authentication-based access to the Azure DataBricks database with the CDATA JDBC drivers. This access is available for both SPARK LIBNAME and SPARK CASLIB statements against the Azure Databricks database. SAS' Uttam Kumar shows you how to use the Service Principal to include Azure environment details, Databricks properties and more.

Get the details on Git authentication domains in SAS Studio on SAS Viya

The move to authentication domains is a necessary step towards enhanced security. SAS' Bogdan Teleuca reveals the steps to ensure a seamless transition and continue to manage your Git repositories efficiently.

​​​​​​​​​​​​​​Use case

wienerberger logo

Find out how wienerberger AG uses SAS® Viya® on Microsoft Azure to create a connected factory, reduc...

Founded in 1819, this Vienna manufacturer produces materials for every stage of the building process, such as clay blocks for walls, roof tiles and paving stones. To achieve its goal of becoming carbon neutral by 2050, wienerberger includes SAS among innovations to implement sustainable manufacturing practices. 

Explore new SAS training: AI and machine learning

With multiple learning paths, we have courses for all skill levels – beginners, those looking to upskill their team or advanced professionals. If you are an AI consumer, business leader, programmer or statistician, you’re sure to find a learning path that will fit your needs as AI and machine learning are becoming part of everyday life. Find the learning path for your role

​​​​​​​​​​​​​​For developers

sas-developers-three-color.jpg

The 2024 SAS Hackathon has wrapped up

Over 100 teams began the journey that concluded in October. You can find out all about the projects on the Hacker’s Hub in the SAS Communities. Watch, or rewatch, the awards ceremony here

​​​​​​​​​​​​​​Upcoming learning events

Snowflake with SAS Container Runtime.jpg

(Each is one hour and complimentary.)

Leveraging Snowflake with SAS Container Runtime + SAS Intelligent Decisioning 

Join SAS’ Robert Ansah and Joe Cabral at 1:00 p.m. ET on Thurs., Dec. 5 to learn how to seamlessly integrate decisioning processes and achieve faster insights from your data. You will learn:

  • The benefits of using containers to operationalize your decisions. 
  • How SAS decisioning and machine learning can be deployed via Snowpark Container Services. 
  • How to leverage data from Snowflake as part of your decisioning process. 

Report Design in Action – Applying Report Design Best Practices 

Join SAS’ Nicole Ball at 11:00 a.m. ET on Tues., Dec. 10 to learn tips and tricks to ensure your reports are both useful and compelling. You will learn:

  • The steps for creating impactful reports. 
  • How to apply report design best practices. 
  • How to choose the best chart type for your data.  
Version history
Last update:
‎11-21-2024 03:15 PM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Article Tags