Tag: SAS tips

Manage the current directory within your SAS program

Using relative file paths in your SAS programs? Use the new DLGCDIR function to manage your SAS working directory — even in SAS Enterprise Guide or SAS Studio — to ensure your programs are working the way they ought to.

The post Manage the current directory within your SAS program appeared first on The SAS Dummy.

Using %IF-%THEN-%ELSE in SAS programs

SAS programmers have long wanted the ability to control the flow of their SAS programs without having to resort to complex SAS macro programming. With SAS 9.4 Maintenance 5, it’s now supported! You can now use %IF-%THEN-%ELSE constructs in open code. This is big news — even if it only […]

The post Using %IF-%THEN-%ELSE in SAS programs appeared first on The SAS Dummy.

Your mapping toolkit Tip #1 – reducing border complexity

With the advent of things like car GPS & Google Maps, and a steady supply of nice maps from certain news sources (such as the New York Times), people have finally embraced the idea that mapping data can be very useful. And if you are into data visualization, you have […]

The post Your mapping toolkit Tip #1 – reducing border complexity appeared first on SAS Learning Post.

Assign a SAS library to a different path depending on your OS

One thing that we have a lot of at SAS: installations of SAS software that we can run. I have SAS for Windows on my laptop, and I have access to many centralized instances of SAS that run on Linux and Windows servers. (I also have access to mainframe SAS, […]

The post Assign a SAS library to a different path depending on your OS appeared first on The SAS Dummy.

Adding Google Web Fonts to your SAS reports

Because I began my SAS career in the Publications division, I like to think that I have a keen eye when it comes to SAS documentation. When I first visited the SAS 9.4 online documentation, I immediately noticed that it had a different look. Examine the image below; can you […]

SAS trick: get the LIBNAME statement to create folders for you

When I work on SAS projects that create lots of files as results, it’s often a requirement that those files be organized in a certain folder structure. The exact structure depends on the project, but here’s an example: /results |__ html |__ images |__ xls |__ data Before you can […]

Comparing data set schemas in SAS

The project that I’m currently working on requires several input data tables, and those tables must have a specific schema. That is, each input table must contain columns of a specific name, type, and length in order for the rest of the system to function correctly. The schema requirements aren’t […]

How to get your SAS data set attributes into Excel

I’m working on a SAS programming project with a large team. Each team member is responsible for a piece of the overall system, and the “contract” for how it all fits together is The Data. For example, I’ve got a piece that performs some data manipulation and produces several output […]