Make like a banana and split

3

Most modern programmer text editors allow you to see multiple views of the document you're working on. The SAS program editor within SAS Enterprise Guide is no exception, although we've done a pretty good job of hiding this feature. Read on and learn how to easily "divide and conquer" your SAS programs and output!

First, why would you want to see multiple views of the same document? Imagine that you're working with a loonnnnnng SAS program. You need to cross-reference some lines near the top with some content near the bottom. It sure would be nice to split the view so you can see both the top and bottom at the same time.

Splitting code to get a handle on that long program

Or imagine a SAS listing output that shows wide data columns, and you want to see the columns near the front at the same time you're checking out values in the later columns.

Splitting the listing to see the head and the tail of a row

Here's how you can split the view of your SAS program, listing or log. First the easy way: right-click in the editor view and select Split from the popup menu. You can select Stacked (for top-bottom view), Side by side (for a next-to-each-other view), or Both (gets you a four-way view that looks cool but might not be so useful).

Perform a split without stretching first

If you're feeling very dexterous, you can grab the splitter handle, located at the top or the left side of the editor window, and drag it to where you want the dividing line to be. The tricky thing is that the splitter handle is hidden well, so you have to rely on the shape of the cursor to indicate when you've got it.

It's like hunting for a treasure.

To restore the window to a single view, right-click and select Split->None. Or simply aim carefully and double-click on the dividing line, which makes it disappear.

If you're not using SAS Enterprise Guide (what? that's crazy talk) but instead you're in the SAS windowing environment, you can get some of the same benefit by selecting Window->New Window. That will create a second view of the active SAS program that you can scroll through.

Tags SAS tips
Share

About Author

Chris Hemedinger

Director, SAS User Engagement

+Chris Hemedinger is the Director of SAS User Engagement, which includes our SAS Communities and SAS User Groups. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies

3 Comments

  1. Containing three natural sugars - sucrose, fructose and glucose combined with fiber,
    a banana gives an instant, sustained and substantial boost of energy.
    Research has proven that just two bananas provide enough energy for a strenuous 90-minute workout.
    No wonder the banana is the number one fruit with the world's leading athletes.
    But energy isn't the only way a banana can help us keep fit.
    regards

    [note from Chris: typically I wouldn't let an off-topic comment like this go through, but I figure what's the harm in promoting delicious bananas?]

  2. Pingback: Turn your data set into a DATA step program - The SAS Dummy

  3. Pingback: Ten SAS Enterprise Guide program editor tricks - The SAS Dummy

Back to Top