SAS on a Mac? - Western Users of SAS Software

Transcription

SAS on a Mac? - Western Users of SAS Software
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.
Also, you can do almost anything in Windows using only the keyboard. You quickly hit limits on what can easily done
with the Keyboard on a Mac.
How fast is SAS in an emulator?
Pretty fast, actually. I haven't done extensive testing, but it certainly feels as fact as SAS running on my work
desktop. Remember, Apple sells very good hardware, probably better than your Windows machine.
What's slow?
Disk I/O to the Macintosh file system can be really slow.
Your virtual machine can see three kinds of local disks: a preallocated virtual disk (the fastest choice), an expandable
virtual disk that grows when you need it to, and a network disk that shows the Macintosh file system.
This last choice, the network disk, is much slower than a preallocated virtual disk. Use this choice only when you
need to pass files back and forth between Windows and the Mac, or between virtual machines.
What if I need a SAS program to run really fast?
Boot Windows natively using BootCamp and run your program there.
Do I need a Windows license?
Yes, and you will probably need to buy a new license – it's unlikely that a license from an existing machine can be
transferred.
But you'll need only one license, no matter how many copies of Windows you are going to run on one Mac. You will
have to call an automated Microsoft help line to get the second and subsequent licences activated, but I had no
problems.
8
Which version of Windows do I need?
I'd say Windows XP if it's still available – you probably won't need the extra visual features in Vista, and there are
rumors that some of the graphics gravy doesn't work well under any emulator. To run SAS, the Pro version of either
Windows is recommended, not the Home version.
Aren't Macintoshes more expensive than Windows machines?
There's debate about that, because exact hardware equivalents aren't available, but there's no doubt that the
cheapest MacBooks cost more than the cheapest Windows notebooks. My answer would be yes, Macs are more
expensive. Remember, Apple is a hardware manufacturer at heart, and has a monopoly on machines running Mac
OS X. They don't want sellers to offer discounts.
So how can I get a bargain?
You can buy a discontinued or refurbished machine from Apple, www.apple.com. I've heard that there's often an
official sale on Black Friday, the day after Thanksgiving. A local Macintosh user group may arrange for a temporary
discount (a week after I bought my MacBook, MacNexus and BestBuy offered a one day 10%-off sale). And finally,
although sellers can't discount prices, they can throw in free or discounted software and hardware – this often
happens at MacMall, www.macmall.com, but similar deals can be found at other Internet sites.
Can I connect to work through a VPN?
Probably. I can't connect to my work VPN on the Macintosh side, but it works fine in the Windows virtual machine. It
really depends on how your IT department has set things up.
If I boot Windows under BootCamp, can I read my Macintosh files?
Yes, if you buy a third-party device driver called MacDrive.
Any closing comments?
Macintosh users would never put up with the complicated dialogs that are needed to perform many common tasks,
especially system related tasks. Take the task of adding a new WiFi connection. Windows makes yu go through a
long set of dialog boxes asking for things you're not likely to know, like whether it's WEP or WPA and what kind of
encryption is being used. The Mac just figures out what it can and prompts you for the rest in a way you can
understand.
Serious Windows users will not be happy with the sorry state of documentation for Mac programs. It's mostly pictures
and videos; detailed information on the workings of common Mac programs is hard to find unless you fork out for a
third-party book.
CONTACT INFORMATION
Jack Hamilton
[email protected]
http://www.excursive.com/sas/
Please check http://www.excursive.com/sas/papers/ for an updated copy of the paper and the slides a week or so
after the conference. You can also find a set of links to related articles and web sites.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS
Institute Inc. in the USA and other countries. ® indicates USA registration.
Other brand and product names are trademarks of their respective companies.
9