Make like a banana and split

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

One Comment

  1. woodwillam
    Posted November 9, 2009 at 3:52 am | Permalink

    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?]

One Trackback

  1. [...] (If you're wondering how I'm "splitting" the code view in this picture, check out this blog post about an editor trick.) [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>