BookmarkSubscribeRSS Feed
Hello_there
Lapis Lazuli | Level 10

Hello all,

 

Disclaimer: I know that there are very talented programmers here who have more years of experience in SAS than I do years of formal education, but please excuse my questions if they seem rudimentary.

 

My main questions are:

1j What kind of tips are there for being an efficient programmer (i.e. good habits)?

2) Other than the obvious of just practicing, how do I get better?

     2a) Are there good training websites (like Udemy, Coursera) or books that you would recommend?

3) Is there a knowledge of a specific key concept, proc or data step manipulation that really unlocked the way you program that i should focus on to be more efficient? (i.e.- do loops, arrays, hash tables, etc)

 

I recently graduated a year ago and got a job as a statistician for a CRO. I notice that I do a lot of SAS programming (like 99 percent of my job) and I want to get better at doing TFLs (Table, listings, Figures). Mainly i want to get better at doing Tables and Listings.

 

For the most part, I really like my job and enjoy the gratification i get from solving complex puzzles that require unique solutions for getting tables/listings to look like the mock. But I feel that I'm slow, and my code is a little bit longer than it should be. I also get frustrated easily because I feel like there is a lot that I don't know how to do that would make my life easier, but because of a lack of a mentor or someone to guide me on being a better programmer, I'm not able to fill out my knowledge gaps more quickly. I'm interested in hearing how others improved, and how I can take my programming skill to the next level.

 

8 REPLIES 8
PaigeMiller
Diamond | Level 26

Some answers:

 

1) https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers...

3) you need to get really good at the skills you are using repeatedly; you mention "tables and listings", but is that PROC REPORT or PROC SQL or PROC PRINT or something else? Pick one of these, and any other skills you use repeatedly, and learn these skills in depth. No one knows everything, but you can make yourself stand out if you master a couple of regularly used skills

--
Paige Miller
Hello_there
Lapis Lazuli | Level 10
Thanks for the link, that's exactly what i was looking for.
Quentin
Super User

If you're in Pharma, I would also browse PharmaSUG papers (as well as papers from other conferences).  

 

https://www.lexjansen.com/pharmasug/

 

When I was early career, in addition to online communities, and official training classes from SAS, I found attending user group conferences very helpful, and motivating. I'm not early career any more, and I still find attending user group conferences very helpful, and motivating.

 

Also, don't forget about SAS books by users, e.g.  https://support.sas.com/en/books.html.  

 

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
webart999ARM
Quartz | Level 8
  1. Some tips for being an efficient SAS programmer include:
  • Writing well-structured, modular code that is easy to read and understand. This means using clear and descriptive variable and function names, as well as using appropriate indentation and commenting your code to explain what it does and how it works.
  • Leveraging existing SAS procedures and functions wherever possible, rather than reinventing the wheel. This will save you time and effort, and also ensure that your code is more robust and reliable.
  • Testing and debugging your code thoroughly before running it on your final data. This will help you catch and fix any errors or issues before they become major problems.
  • Staying organized and keeping track of your work. This means using a consistent file naming convention, keeping your code and data files in separate folders, and using a project management tool or workflow diagram to plan and manage your tasks.
  1. In addition to practicing regularly, there are several other ways to improve your SAS programming skills:
  • Seek out opportunities to work on challenging projects that will push you to learn new techniques and approaches. This could be a real-world problem that you encounter in your job, or a personal project that you undertake in your free time.
  • Join online forums or user groups where you can ask questions, share your work, and get feedback from other SAS programmers. This will help you learn from others, as well as connect with like-minded individuals who can provide support and guidance.
  • Take online courses or workshops on SAS programming. Some popular platforms for learning SAS include Coursera, Udemy, LinkedIn Learning, and SAS Academy for Data Science. These courses will provide you with structured learning materials, as well as opportunities to practice and apply your skills in real-world scenarios.
  • Read books and other reference materials on SAS programming. Some good books to consider include "The SAS Programming Language" by Ron Cody, "SAS for Dummies" by Stephen McDaniel and Chris Hemedinger, and "SAS Programming by Example" by Ron Cody and Ray Pass. These books will provide you with a solid foundation in SAS programming concepts and techniques, as well as examples and case studies that will help you see how these concepts are applied in practice.
  1. One key concept that is essential for effective SAS programming is understanding how to manipulate data using data steps and procedures. This includes concepts such as data types, variables, expressions, loops, conditional statements, and functions. Once you have a strong foundation in these concepts, you can start exploring more advanced techniques such as arrays, hash tables, and other data structures that will enable you to work with large and complex datasets more efficiently.

Overall, the best way to improve your SAS programming skills is to practice regularly, seek out opportunities to learn from others, and stay up to date with the latest developments in the field. With time and effort, you will be able to develop the skills and expertise you need to become a more efficient and effective SAS programmer.

Hello_there
Lapis Lazuli | Level 10

@webart999ARM wrote:
  • Join online forums or user groups where you can ask questions, share your work, and get feedback from other SAS programmers. This will help you learn from others, as well as connect with like-minded individuals who can provide support and guidance.

 


Thanks for your reply. Besides this community, is there another forum/discord/website I can join that I can talk about SAS with other programmers? As far as I'm aware, it's only here and reddit.

Quentin
Super User

@Hello_there wrote:

@webart999ARM wrote:
  • Join online forums or user groups where you can ask questions, share your work, and get feedback from other SAS programmers. This will help you learn from others, as well as connect with like-minded individuals who can provide support and guidance.

 


Thanks for your reply. Besides this community, is there another forum/discord/website I can join that I can talk about SAS with other programmers? As far as I'm aware, it's only here and reddit.


Interesting, I had never looked for SAS stuff on reddit.

 

There is an ancient listserve, SAS-L, that is still active, but not nearly as active as here.   https://listserv.uga.edu/scripts/wa-UGA.exe?A0=SAS-L

 

Plenty of SAS questions on stack overflow, but I don't think of that as community.

 

There's a fun SAS quiz site, which has some social features: https://sasensei.com/ .  If you write questions, people will review and comment.

 

I've heard there are SAS groups on FB, but I haven't been in them.

 

There are some SAS groups on LinkedIn, but when I tried them they were heavily recruiter noise, and linked in isn't really great for sharing code etc.

 

But honestly, I would say this is the best community site, especially as there is lots of involvement from both SAS users and SAS employees.  If you hang out here, and ask questions, and try answering questions, you'll learn a lot.

 

Look forward to hearing thoughts from others on online SAS community forums.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
FreelanceReinh
Jade | Level 19

Hi @Hello_there,

 

Regarding efficiency:

  • While the actual typing of code is rarely the most time-consuming part of programming, I still find it useful to have various custom keyboard shortcuts and abbreviations available in my Enhanced Editor.
  • I also use several utility SAS macros and user-defined formats for frequently recurring tasks (of course not in production code for customers).
  • In 1999 I started to write down SAS coding tricks, interesting language features, bugs, etc. that I came across during my work. (In recent years the source of many of these notes were posts by the great experts here in the SAS Support Communities.) Thus I can quickly find relevant code snippets by searching these text files.
  • I assume that you will frequently look up syntax details or examples in the SAS documentation. Hopefully you have access to the SAS Documentation Viewer or the offline help files of a SAS installation so that you don't have to wait for the slow online documentation pages to load. Either way, it's important to be familiar with the structure of that vast material and with the syntax notation used there. It may seem trivial to find the documentation of a particular language element, but since the advent of DS2, FedSQL, countless Viya versions, etc. it's easy to click a wrong link, especially when searching the online documentation, if you don't pay attention to small details.

Regarding key concepts and books:

Hello_there
Lapis Lazuli | Level 10
Thanks for sharing your tips, Freelance Reinhard!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1136 views
  • 15 likes
  • 5 in conversation