Tag: sas programming

And it’s Boaty McBoatface by an order of magnitude

In a voting contest, is it possible for a huge population to get behind a ridiculous candidate with such force that no other contestant can possibly catch up? The answer is: Yes. Just ask the folks at NERC, the environmental research organization in the UK. They are commissioning a new […]

The post And it’s Boaty McBoatface by an order of magnitude appeared first on The SAS Dummy.

Add files to a ZIP archive with FILENAME ZIP

In previous articles, I’ve shared tips about how you can work with SAS and ZIP files without requiring an external tool like WinZip, gzip, or 7-Zip. I’ve covered: How to create ZIP files with ODS PACKAGE ZIP (available since SAS 9.2) How to “unzip” and read ZIP files using FILENAME […]

The post Add files to a ZIP archive with FILENAME ZIP appeared first on The SAS Dummy.

SAS knows it’s a leap year. Do you?

Leap year questions come up all of the time in computing, but if there is any true season for it, it’s now. The end of February is approaching and developers wonder: does my process know that it’s a leap year, and will it behave properly? People often ask how to […]

The post SAS knows it’s a leap year. Do you? appeared first on The SAS Dummy.

Sorting data in SAS: can you skip it?

TL;DR The next time that you find yourself writing a PROC SORT step, verify that you’re working with the SAS Base engine and not a database. If your data is in a database, skip the SORT! The details: When to skip the PROC SORT step Many SAS procedures allow you […]

The post Sorting data in SAS: can you skip it? appeared first on The SAS Dummy.

Using the ODS statement to add layers in your ODS sandwich

The ODS statement controls most aspects of how SAS creates your output results. You use it to specify the destination type (HTML, PDF, RTF, EXCEL or something else), as well as the details of those destinations: file paths, appearance styles, graphics behaviors, and more. The most common use pattern is […]

The post Using the ODS statement to add layers in your ODS sandwich appeared first on The SAS Dummy.

DATA STEP text file tricks

When reading a text file (common extensions: TXT, DAT; or, for the adventurous: HTML) with the DATA STEP, you should always view several lines from the text file, and compare to the record layout, before completing the INPUT statement.  There are many ways to view a text file.  I use […]

The post DATA STEP text file tricks appeared first on The SAS Training Post.

Dataset too big for PROC PRINT?

Dataset too big for PROC PRINT? One weird trick solves your problem! proc print data=bigdata (obs=10); run; The OBS= dataset option specifies the last observation to process from an input dataset. In the above example, regardless of dataset size, only the first 10 observations are printed; an easy way to […]

The post Dataset too big for PROC PRINT? appeared first on The SAS Training Post.

10 reasons to learn SAS code even when you have Enterprise Guide

New York City Mayor, Michael Bloomberg made a new-year’s resolution to learn code. Apple’s Steve Jobs said, “I think everybody in this country should learn how to program a computer because it teaches you how to think.” President Barrack Obama said, “Don’t just buy a new video game, make one. […]

The post 10 reasons to learn SAS code even when you have Enterprise Guide appeared first on The SAS Training Post.