1.7.10

Project specific SAS shortcuts

Prepared by Jose Abraham

 

As a SAS programmer, an important concept to know when opening and saving SAS programs is the ‘SasInitialFolder’. The location of this folder is the path name where SAS reads or stores files when a specific drive and pathname is not given. The name of this path appears in a small panel located in the lower right-hand corner of our SAS session. This can be changed at any time with a double-click within that rectangle to access a dialogue box, then entering the drive and path to the desired folder in the space provided or by moving through the folders as done while searching for a particular file. But the change which is made is not permanent. During the next invocation of the SAS System, the current folder will by default present the current folder path that was permanently set. In SAS v8 for windows, the default folder may be something like “C:\Documents and Settings\<user name>\My Documents\My SAS Files\V8” or a path which is in the drive where SAS is installed (e.g. “E:\SAS Installation”). When trying to open or save a program in a SAS session, this default folder will be shown and changing this folder to the desired folder may consume some amount of our valuable time. Here is the way to save this time and also to make project specific SAS shortcuts, which will allow opening and saving SAS programs of that project from the ‘SAS Programs’ folder which is set for that project. The steps to set the current folder to a new location are given below. The folder which is to be set should be created before going through the following steps. 1. Create a shortcut of SAS by clicking on the ‘Start’ menu and select ‘SAS’ from ‘All Programs’, right click on it and then select ‘Send to Desktop’. Then a new SAS shortcut icon will be created in the desktop.2. Right click on the icon and select ‘Rename’ and give a name related to the project.3. Again right click on the icon and select ‘Properties’ and click on the ‘Shortcuts’ tab.4. In the ‘Target’ box, go to the far end of the right-hand side of what is seen in that by pressing the ‘End’ button. Type one space, and enter the following command exactly as you see it here: -sasInitialFolder="."5. The current or working SAS folder will be the pathname that is specified in the 'Start in' field (located just below the 'Target' field). To designate the choice of the current folder, enter the drive and pathname of it within that box. This folder needs to exist on the specified directory.e.g. “G:\Project1\SAS programs”6. Click on ‘Apply’ and then click ‘OK’. The shortcut is now ready for use for the particular project and it will direct to the specified folder on clicking ‘File-> Open’ or ‘File->Save As”.


No comments: