SAS on a Mac? Yes! Jack Hamilton, Kaiser Foundation Health Plan, Oakland, California
Total Page:16
File Type:pdf, Size:1020Kb
SAS on a Mac? Yes! Jack Hamilton, Kaiser Foundation Health Plan, Oakland, California SAS ON A MAC? In recent years, Apple Computer has progressed from being a niche player, whose products were used only by hobbyists at home and graphics and marketing departments at work, to being a media darling, to having its computers adopted by many people as a serious alternative to Microsoft Windows. But who cares if it can spreadsheets and Photoshop and junk? Does it run SAS software? The short answer is yes. The long answer is slightly more complicated, and is explained below. THE PRESENTATION I'm not going to attempt to tell you everything you might possibly need to know about using SAS on a Mac. That would be as hopeless a task as attempting to tell you everything about running SAS on any other platform - books have been written on the subject without covering everything. Besides, any documentation would be outdated almost as soon as I had typed it in. Rather, I will show that that running SAS on a Mac is straightforward, and nothing to be afraid of. I encourage you to make liberal use of Google to look up anything I discuss. AN INTRODUCTION TO THE MAC I've used Windows for many years, starting with a brief and unsuccessful flirtation with Windows 1.0, and going up to Windows XP. Before that I used Microsoft and IBM DOS. So switching to a Mac had a certain learning curve. Let's look at the main window: Although you won't be able to see it in the PDF or through a projector, a Macintosh has a very impressive display – high resolution, with beautiful colors (this particular picture is of a sunset in Alaska). You'll notice that there's no Start menu and no status bar, just a menu bar at the top and some icons on the side and 1 at the bottom. Rather than having a menu in each program, Macintosh OS X 10 uses a single menu bar at the top, which changes to reflect the currently active application. The icons on the side represent data drives, either real or virtual. The icon with a cloud on a purple background opens a disk drive out in "the cloud: on the internet. The bottom set of icons is called the dock, and it replaces the Start menu in Windows. Each icon represents a program or a list of files and programs, and clicking on the icon opens the program or displays the list. The set of icons you see on a new Macintosh is dauntingly cryptic, but you'll soon learn what means what, and you can tailor the dock so it shows only what you care about, as I have done. The first icon, with the cute little face, opens the Finder, which is the Mac equivalent of a Windows Explorer file menu. On the left is a list of disks and directories, similar to what you get in the folder view in Windows. One useful feature on the Mac is the ability to add favorite directories to the list, under Places. I've added quite a few, perhaps too many, but Windows limits you to only a handful. There are file list display options. One looks quite a bit like the detail list in Windows, with details shown on every file: 2 Another shows a cascading list of the directories leading up to the current directory: And another one shows a preview of the selected file and the surrounding files: 3 One of the icons is for all the applications on my Mac; I can click on the icon and get a list of what's available, similar to the Programs list in the Windows start menu: This can be just as confusing as the programs menu in Windows, but happily you can create your own dock groups with just a small set of files you're interested in: 4 Now, if you have sharp eyes you might have noticed a familiar icon in the doc: Looks like the SAS icon, doesn't it? Lets see what happens when you click on it: It's SAS, running on a Mac. But I mislead you a little bit. Notice that the log says Windows XP Pro. Also notice that instead of having round close, minimize, and maximize buttons in the upper left, it has square buttons in the right hand corner: What's happening? SAS is running in a virtual Windows machine running under Mac OS X. 5 VIRTUAL MACHINES So what's a virtual machine? It's an emulator, that makes one operating system (the "guest") think it's running on its own private hardware, even though it's actually running as a subprogram under the control of another program (the "host"). In this case, Mac OS X is the host, and Windows XP is the guest. You may have tried running a virtual Windows machine on the Mac a few years ago, and been disappointed by its performance. Happily, two things have happened: the hardware's gotten better, and the software's gotten better. And the big change is that Mac OS X now runs on the Intel i386 family, meaning that the software doesn't have to emulate as much. The combination has made running a virtual machine very fast for most operations – there's no emulation at all, just machine instructions passed directly through to the hardware, as on a native operating system. THE EMULATORS There were, at the time this paper was submitted, two major players in the Windows-on-a-Mac market: VMWare Fusion from VMWare, and Parallels Desktop from Parallels. The two programs are very similar in what they do. In the past, when one company has added a feature the other has soon followed. Both seem to have been designed by people who were familiar with both the Windows interface and the Macintosh interface, and are relatively easy to use. That said, I have chosen to use VMWare Fusion. It seems a bit more robust in the area of networking. I regularly lose my ability to access the internet when I use Parallels Desktop, and that doesn't happen with VMWare Fusion. That problem may be related to my use of a cell-phone modem rather than a regular Ethernet connection, so the problem might not apply to you. Try them both – they both offer free trials. There are at least two other possibilities you might want to consider. One is WINE, the open source Windows emulator. I doubt it's robust enough to run SAS, but if you're fearless, try it. Make sure you have good system backups first. The second is a new virtualization program released by Sun. It's likely to work well once the initial round of bugs has been worked out, bu I haven't tried it. VMWARE FUSION After you have installed Fusion, you will get get a choice of how you want to install and run Windows. You will probably want to create a new virtual machine and install Windows in it. You may also chose to install BootCamp, which allows you to boot your Mac directly into Windows, with no emulator involved (remember, Macs now run on Intel hardware). If you are a Linux user, you might also want to install a copy of that, or download a ready-to-run copy from the internet (VMware provides a listing of virtual machines that others have already built, and the Linux machines are usually free. Here's my VMWare virtual machine library: 6 I can run Ubuntu Linux or Windows XP. I have two copies of Windows XP – a copy in a dedicated virtual machine, and a copy in BootCamp. If I had a license for SAS under Linux, I could install it in Ubuntu, but my only SAS license is for Windows, so that's where I put it. SINGLE WINDOW MODE VS UNITY MODE Both VMWare and Parallels offer the option of running each program in its own Macintosh window, as shown above, or of showing a single Windows window with all of the Windows program running within it, as show here: Which you use is largely a matter of preference - the capabilities are the same, they're just presented differently (actually, you can get a slightly larger window in Unity mode, but it's not much larger). I tend to run in Unity mode if I have only one Windows program open, and in single window mode if I have several programs open. QUESTIONS AND ANSWERS What's the hardest thing to get used to when you switch from Windows to a Mac? For me, it's the keyboard. Here's what my MacBook Pro keyboard looks like: 7 It's fairly similar to a Windows keyboard, but notice that there's no Insert key, and no PageUp or PageDown. Full-size keyboards have PageUp and PageDown keys, but not an Insert key for some unfathomable reason. Within the Windows virtual machine, you can use a free program called AutoHotKey to assign keystroke combinations to create your own Insert key and any other keys or key combinations you want. I would have thought that the single-button mouse, the different arrangement of items on the screen, the use of the dock instead of a start menu, or any of the other visual differences would have been difficult, but in fact they took very little time to get used to. It's the keyboard difference that's hard – I guess Windows has worked its way into my physical memory.