# Author

RSS
Principal Technical Training Consultant

Mark Jordan (a.k.a. SAS Jedi) grew up in northeast Brazil as the son of Baptist missionaries. After 20 years as a US Navy submariner pursuing his passion for programming as a hobby, in 1994 he retired, turned his hobby into a dream job, and has been a SAS programmer ever since. Mark writes and teaches a broad spectrum of SAS programming classes, and his book, "Mastering the SAS® DS2 Procedure: Advanced Data Wrangling Techniques" is in its second edition. When he isn’t writing, teaching, or posting “Jedi SAS Tricks”, Mark enjoys playing with his grand and great-grandchildren, hanging out at the beach, and reading science fiction novels. His secret obsession is flying toys – kites, rockets, drones – and though he usually tries to convince Lori that they are for the grandkids, she isn't buying it. Mark lives in historic Williamsburg, VA with his wife, Lori, and Stella, their cat. To connect with Mark, check out his SAS Press Author page, follow him on Twitter @SASJedi or connect on Facebook or LinkedIn.

Programming Tips
0
Jedi SAS Tricks: GIT my macros

I use macros extensively in my SAS programs, and over the years have accumulated a few that I find quite useful. The integration of GIT and SAS Studio has made it easy to build a re-usable macro library, so I've put some of the more polished macros I've written in

0
Jedi SAS Tricks: The DSTODS2 Procedure

You have the infrastructure, and you know that DATA step would run so much better in DS2, but it’s complicated and you don’t know how to get started. Well, if you have SAS 9.4M5, rejoice! The DStoDS2 procedure is here, and it’s a humdinger! (No, Chris, not a Hemedinger… ;-) It's

Learn SAS
0
Jedi SAS Tricks - The Double vs. Decimal Dilemma

I ran across an interesting conundrum the other day. The intent was to compare the value of X to a list of desired values, and if X matched one of the values in the list, set Flag to 1, otherwise set Flag to 0.  I wrote and executed this test program,

Learn SAS
0
Jedi SAS Tricks: The %PATHNAME to Enlightenment

I often create temporary ODS output files - and getting rid of those files after I'm done is an extra chore I don't relish. For example, if I want to generate a PDF-only report and email it from SAS (see "Jedi SAS Tricks: Email from the Front – Part 2")

Learn SAS
0
Jedi SAS Tricks - Variable Lists by Text Pattern

I hate hard-coding variable lists in my SAS code. I love the special variable lists SAS provides, like name:, _numeric_, etc. But back in 2011, I wrote a post titled Jedi SAS Tricks - Building a Name Suffix variable list lamenting the lack of a special variable list in base

Learn SAS
0
Jedi SAS Tips - Favorite Resources for SAS Programmers

I frequently get asked about my favorite book on a particular topic, how to find free SAS learning materials online, how to get help with SAS issues, etc. So I thought I'd share it with you here! Last updated 2/25/2020 Getting Started Resources New to SAS? Here's your SAS Starter

Learn SAS
0
Jedi SAS Tricks - FedSQL Dictionary Tables

Dictionary tables are one of the things I love most about SQL! What a useful thing it is to be able to programmatically determine what your data looks like so you can write self-modifying and data-driven programs. While PROC SQL has a great set of dictionary tables, they all rely

0
SAS Jedi Christmas - SAS 9.4 M4 DS2 Do Loop Upgrade

This SAS Jedi is very excited about the SAS 9.4 M4 release, which brought many wonderful gifts just in time for Christmas. So in the interest of extending the Christmas spirit, I'm going to blog about some of my favorites! I've long loved the SAS DO statement variant which allows

0
Jedi SAS Tricks: Explicit SQL Pass-through in DS2

One of the things I’ve come to love most about DS2 is the tight integration with SQL which makes so many data prep chores so much less onerous. An example is DATA program BY group processing. With a traditional DATA step, you must first sort or index the source data

Programming Tips
0
Jedi SAS Tricks: Writing to Text Files from DS2

A reader posed a question in the comments to an earlier Jedi SAS Trick, asking how to write the results of a DS2 DATA _NULL_ program to a text file. It's an interesting question, as DS2 currently has no text file handling statements or capabilities. Take, for example, this traditional

Learn SAS
0
Are you a SAS Jedi? Why not share your knowledge?

Have you been kicking around ideas for a great SAS book, but don’t know how to get started? Don’t wait another day – connect with the Publish with SAS community and let those amazing folks at SAS Press help you get your project rolling. You won’t regret it! I’m SO

Learn SAS
0
Jedi SAS Tricks: DIY Tasks in SAS Studio

In my previous post, Jedi SAS Tricks - Make This a Button in Base SAS I demonstrated running a SAS program from a tool bar button in the SAS Windowing environment. The program we execute is the macro from a previous post, Jedi SAS Tricks: The DATA to DATA Step

Programming Tips
0
Jedi SAS Tricks - Maximum Warp with Hadoop

I'm gearing up to teach the next "DS2 Programming Essentials with Hadoop" class, and thinking about Warp Speed DATA Steps with DS2 where I first demonstrated parallel processing using threads in base SAS. But how about DATA step processing at maximum warp? For that, we'll need a massively parallel processing

Programming Tips
0
Jedi SAS Tricks: Warp Speed DATA Steps with DS2

I remember the first time I was faced with the challenge of parallelizing a DATA step process. It was 2001 and SAS V8.1 was shiny and new. We were processing very large data sets, and the computations performed on each record were quite complex. The processing was crawling along on

Programming Tips
0
Jedi SAS Tricks - These aren't the labels...

In the first Star Wars movie, Obi-wan uses Jedi mind tricks to convince the stormtroopers that the droids they see are not the droids they're looking for.  A colleague at SAS passed along a question from a SAS user where the column labels they were seeing were NOT the labels

Learn SAS
0
Jedi SAS Tricks - DS2 gives you more to LIKE

I've been a busy Jedi the last few months and have spent the bulk of my non-teaching days learning new Jedi SAS tricks to share with you. The finishing touches are going on to our brand-new, one and a half day DS2 Programming: Essentials class. It's rolling out on December 16

Programming Tips
0
Jedi SAS Tricks: FUNC(y) Formats

In the previous episode, we built our own custom SAS function - a masterful trick indeed. Gordon Keener, a developer here at SAS, responded exuberantly "You think that's cool? - try THIS!" and proceeded to demonstrate prodigious powers with the SAS by using a custom function in a custom informat

Programming Tips
0
Jedi SAS Tricks – Roll Your Own Function

A SAS user (who lives in the the US) emailed me a question about SAS functions. He was reading UTC (Coordinated Universal Time) datetime values from server logs, and to make future calculations and comparisons easier, he wanted to transform the value to local datetime.  The INTNX() function worked great, but

Learn SAS
0
Jedi SAS Tricks: Some Experience Required

As a Master Chief in US Navy submarines, one of my favorite sayings was “Good judgment comes from experience, and experience comes from poor judgment.”  I've always had difficulty solidly learning new programming techniques in a traditional classroom.  The new techniques and theories I've learned don’t really take root until I've used them to solve

Programming Tips
0
Jedi SAS Tricks: These aren't the droids... Episode 1

In the Star Wars movie, Obi-wan could just wave his hand, mutter a few words, and the stormtroopers would "move along".  How the power of the Force makes ridding yourself of problematic characters so much easier! I recently was invited to become an alternate instructor for Ron Cody’s SAS Business

Programming Tips
0
Jedi SAS Tricks: Building a Name Suffix variable list

If you’ve taken one of my SAS classes you may recall “Mark’s 3 rules of programming”, the first of which is “Lazy programmers are GOOD programmers.”  One of the things I love about best about SAS programming is the plethora of functions and shortcuts built into the language, all designed