Welcome to the SAS for the Macintosh Resource Page special report on the newly-released SAS version 6.12 for Mac OS for Power PC!
First of all, notice that it's now named "SAS 6.12 for Mac OS for PowerPC" If you have a 68K machine, you'll need to stay with SAS 6.10; version 6.12 is PowerPC only. The rest of the somewhat unwieldy name reflects Apples' OS naming decisions and the rise of the clone market.
It seems nice so far; I've been working with the production release for about a week now. There are lots of new features, making the Mac more of a "mainstream" SAS platform. However, there are still a number of "outstanding problems", otherwise known as bugs. If you use SAS/INSIGHT, read the bug report section below carefully.
Some of the "new" features of SAS 6.12 were actually released in later copies of SAS 6.10. Most notable are the Invoke SAS AppleScript extension and the SAS System OpenDoc part, which were originally available on the February 1996 Usage Notes CD and which are installed in the "SAS Extras" folder.
The new features of version 6.12 on the Mac include:
Version 6.12 comes with a new approach to providing help, and configuring it can be a bit maddening. What follows is a discussion of how the help is provided, what sorts of problems arise, and how to fix them. I think I've come up with a fairly decent solution, down at the end of this section. I've subsectioned because it got a little long.
The primary format for help in the new release of SAS is the HTML package and browser. The online documentation, including the new SAS Companion for Mac OS for PowerPC, is readable with your web browser. The good thing about this is that it avoids having to have one more help application to run and one more interface to learn. There are bad things, but the biggest one is probably that search and index capabilities are limited compared to dedicated online programs.
SAS comes with a couple of tools to help you get the help system set up. One is Apple's Cyberdog web browser, and the other is the Internet Config package. If you don't already have Internet Config, you should; this is a great package that lets you keep your Internet-related settings in a central place where all programs know where to look for them. Cyberdog is not as essential; the help system works with Netscape Navigator and Internet Explorer.
Setting up HTML help is a little tricky. For the HTML help to work properly, you need to check settings both in your config.sas612 file and in Internet Config.
In the config.sas612 file, you need to have the following lines:
-helpenv html -helploc "Hard Drive:SAS612"
The first option tells SAS to use the HTML help system; the second points the folder which contains the file macdoc.html and the folder help, which contains the rest of the HTML and support files for the help system. By default, this is the same as the SASROOT folder.
Once you've told SAS where the help is, you need to make sure it can find your browser. Even if you're already using Internet Config, you will probably need to change your settings. Normally, in the "Helpers" window of Internet Config, you will set your browser to be the "http" helper; if this is all you have, however, when you try to access help from within SAS you will get the older, character-based help system, along with an error message in the log looking something like:
ERROR: Couldn't launch browser, Mac OS err -666.
The reason for this is that SAS usually sends a request to open a "file://" URL rather than a "http://" URL. By default, Internet Config doesn't know about "file://" URLs, so it produces an error; you need to teach it about the "file://" URL to make the SAS HTML help work. In the Internet Config helpers window, click on the "Add" button. In the "Helper for:" box, enter "file". Then click on "Choose Helper", select your browser again, and save your Internet Config settings. (Note that Internet Config settings are not changed until you close the window or specifically select File --> Save from the menu bar.)
If you want to use the older, character-based help menu system, you need to comment out the -helpenv and -helploc lines in your config.sas612 file. The older help system has some things that the HTML help does not; specifically, it has an extensive syntax guide.
The choices offered by the SAS Guide menu (or Help menu) are a little confusing. What results you get depend on the settings in your config.sas612 file. Two of the menu items produce the same results no matter what the help environment is: "Online Training" brings up SAS/TUTOR (if it is installed), and "Keys" brings up the standard keys window.
With HTML help turned on, "Extended Help" and "SAS System" both bring up a list of online documentation in your web browser. "Online Documentation" brings up a window with frames, including the list of online documents, links to the SAS web site, and a tabular presentation of the table of contents from the new SAS Companion for MacOS for PowerPC. Entering "Help" in the command box or clicking on the Help icon in the tool palette also brings up the basic list of online documents.
With HTML help turned off, "Extended Help", "SAS System", entering "help" in the command box, and clicking on the Help icon in the tool palette all bring up the older text-based help system. "Online Documentation" brings up a window with a message telling you to use the HTML documentation instead. Similar messages appear from within the text-based help when you ask for "Host Information" or "Online Documentation".
The HTML help is structured as a series of online documents, with individual HTML files as large as 750MB (the SAS/EIS tutorial). In the SASROOT directory is a file called macdoc.html, which is a frame-based index of the available online help. The rest of the help files are located in the help folder within the SASROOT folder.
Each piece of documentation except the Mac OS Companion has its own folder inside the help folder. The entire text of the document is in a file called Master.html within that folder, along with supporting files including illustrations (in .gif files) and appendices. The Mac OS Companion files are stored in the help folder itself.
Some of these files are large enough to present browser problems. The MacOS Companion base file is 318K, and would not load properly until I increased Internet Explorer's memory allocation to 6MB (the default is 4MB). Even when the files load properly, links within the main document can present problems; if you click on a link before the anchor it references has been loaded, the link will not work. The Mac OS Companion master file, for example, seems to take about thirty seconds to load completely. Increasing the memory allocation also seems to alleviate this problem somewhat; if you click on a link and are brought to the top of a document rather than to the appropriate spot within, try waiting for the document to finish loading, click on the back button, and then click on the link you just followed. Usually this will shift back to the page you were after and scroll to the correct point.
The HTML documentation has no index. There is a clickable table of contents, but sometimes it's not obvious what section contains the information you're after. There are two solutions to this situation for the SAS HTML help. First, because each document is a single HTML file, you can use your browser's "find" command to search for words or phrases within that document. If you want to find out about SAS and AppleScript, for example, load up the Mac OS Companion and search for the string "AppleScript" using cmd-F (to specify the first occurrence) or cmd-G (to find additional occurrences).
The second solution--if you're not even sure which document contains the information--is to use a text-based search program to look through the raw HTML files for a word or phrase. There are shareware searchers (though I can't remember names at present), as well as a directory search capability within Microsoft Word 5.1 and BBEdit 4.0.
As I mention above, SAS has said that there are no plans to make a hard-copy version of the SAS Companion for Mac OS available. While most browsers can print the document you're viewing with no problem, the entire Mac OS Companion is almost 140 pages long, including a ten-page section at the front listing the contents of the other online documentation. Since browsers don't show pagination, it's hard to print out a selected section of the document. Some print drivers (such as the HP DeskWriter driver) let you preview the document; this lets you figure out which pages you need, but can be time-consuming since the computer has to set up the entire document before you can preview it.
One possible solution--which I haven't tried--is to "print" your document into a PDF file, and then use Acrobat Reader to view and print the pages you want. You could even make a copy of the HTML file, remove the extra material from the front end and do other cleanup work, and then create the PDF file from your modified HTML file. If you already have the necessary software to create PDF files, this may be the best solution. (It may also be more useful if you have a large installation, and you can distribute a PDF document to several users.)
One of the weaknesses of the Macintosh HFS file system is the storage of small files on large disks. Because there are a limited number of allocation blocks, small files end up "wasting" space--for example, on a 2GB hard drive, files take up space in 32K chunks. Hence, if you have a lot of tiny files, they will be stored inefficiently since each must take up at least 32K. One of the problems with HTML documentation in general is that, because it consists of a large number of small files, it takes up more space than it should on your hard drive. On a 2GB hard drive the SAS 6.12 HTML documentation, which contains 13MB of data, takes up 32MB of disk space.
One solution to this is to use a smaller disk (or create a small partition) to store these small files. In this case, this is a little more complex, because SAS itself will be installed on a larger drive, and SAS expects the help files to be in the SASROOT folder. However, there are two workarounds: you can either put aliases to macdoc.html and the help folder in the SASROOT folder, or change the value of HELPLOC in the config.sas612 file to point to the disk on which you have put the HTML-based help files.
Another solution, if you choose to create a PDF file of the HTML documents for printing purposes, would be to keep the PDF file instead of the HTML and use Acrobat Reader rather than a web browser for access to this documentation. Since a PDF document is a single file, there would be no wasted space. This solution would make it more difficult to invoke the help from within SAS, but not impossible; the toolbar trick discussed below will work just as well for a PDF file.
The big problem as I see it: the traditional text-based help and the new HTML help contain different information--the syntax guide in the traditional help is essential if you need to quickly figure out how to use an option in a complicated PROC--and yet, by default, SAS forces you to choose between the two. However, remember that the HTML help uses (a) files stored on your hard drive and (b) a separate application as your browser. This means that the actual process of viewing this help does not involve SAS at all.
An obvious solution would be to reset the HELPENV option from within your SAS session. Unfortunately, HELPENV and HELPLOC cannot be changed except at startup. (These options are not documented in the SAS MacOS Companion. Experimentation shows that the the opposite of HELPENV=HTML is HELPENV=SAS, and that trying to set HELPENV with an OPTIONS statement gives an error message.)
The quickest solution to set up is to turn off HTML help (by commenting out the HELPENV and HELPLOC lines in the config.sas612 file) and then, when you want HTML help, drag the Macdoc.html file onto the icon of your browser of choice.
A simple shortcut is to double-click on the macdoc.html file (or an alias of it). This opens the file with the application matching the file's creator code. As shipped, this creator code is "MOSS" for Netscape Navigator. If you prefer Internet Explorer, change the code to "MSIE" using ResEdit, Drop*Attribute, or another utility which can change creator codes.
You can also add a "HTML Help" button to the SAS toolbar thanks to the X command. This command sends an AppleScript statement to the system software for execution. First, set the creator code on macdoc.html as described above, so that the file "knows" what browser to use. Then create a new button on the toolbar with the following command:
x tell application "Finder" to open file "Hard Drive:SAS612:macdoc.html"; run ;
Give this button a descriptive name and icon, and save the changes to the toolbar. This will give you an additional help button that will bring up the HTML-based help while leaving the standard SAS help available through the existing help button, command line, and help menu. The macdoc.html file will bring up the frame-based menu of online documentation, along with the table of contents of the SAS MacOS Companion. If you find that you regularly use one of the other online documents, you can give that document a button by substituting the correct pathname. For that matter, if you create a PDF version of a document, you can point to that document (and thus to Adobe Acrobat) with the same syntax.
I suggest telling the Finder to open the file rather than telling the browser because in my brief bit of experimentation with Internet Explorer, although the document loaded properly, it generated an error message in the SAS log and failed to bring Explorer to the foreground. The "run" command may be unnecessary; in some situations it generates an error message (but otherwise works); in other situations there is no error message. If you find a better or more elegant solution, please let me know.
Note that some parts of SAS (e.g. the SAS Desktop) have specialized help buttons on customized toolbars that don't work when you have text-based help turned on and that bring up a specialized HTML document when you have HTML help enabled. The best solution here is probably to define a new custom button for that specific toolbar which points to the appropriate HTML file.
One final tip: do you remember the Apple Guide format SAS Companion provided with Macintosh SAS 6.10? Well, although it's no longer provided, and in my opinion it's a shame SAS isn't taking advantage of Apple Guide's features, the 6.10 Guide will still work with Mac OS SAS 6.12. Just drag the old Guide file into the same folder as the SAS application, and the "Host Guide" option will show up on the help menu. This works because the Apple Guide display is handled by the system, not by SAS, so SAS doesn't have to know about it for it to run. (Similarly, if future versions of SAS shift away from HTML documentation, you'll still be able to access the old docs with a browser.)
This section is intended to be a clearinghouse for outstanding problems with SAS 6.12 for Mac OS. If you find a problem that's not listed, let me know and I'll put it on the list and see if there's an explanation. There's a separate section for SAS/INSIGHT problems; I will add other sections as needed.
Let me know what you think of SAS 6.12 for Mac OS for PowerPC via email (scocca@email.unc.edu)--other opinions would be welcomed!
Return to SAS for the Macintosh.