2. 2
We will see….
• What is it?
• Why it's needed?
• How to overcome limitations?
• How it's useful?
• How to implement?
• Benefits
3. 3
What is it?
• Build a Dynamic user friendly project specific SAS session with just one double
click.
• Which allows users to Optimum use of system options and Direct access to
project specific documents from SAS window itself instead of windows explorer.
5. 5
Regular process to initialize project specific SAS session
First create
SAS session
Then run particular project
specific setup or autoexec file
Ready to work
Project specific SAS
Session
1 2 Final
• Two Step (Open and Run) TIME consuming process
• Always need to run first autoexec.sas or setup.sas file to initialize library
and import catalog.
Limitations of Regular process
6. 6
Unable to modify the default
Text "SAS" of AWS title bar after startup of SAS .
• AWS title bar will be helpful to distinguish between multiple project SAS
sessions.
Limitations of Regular process
7. 7
Unable to change initial location as project location
for Open and Save As dialog after SAS startup.
• Need to update SAS initial folder location manually for each new session.
Limitations of Regular process
8. 8
Receiving Warning and Note while opening multiple
SAS sessions or parallel executing batch submit.
Limitations of Regular process
10. 10
• The SAS configuration file contains only SAS system options that are used to
establish SAS session.
• Differences between Configuration and Autoexec Files
• Configuration file can contain only SAS system options settings, while
autoexec files can contain any valid SAS statement.
• Configuration files are processed before SAS initializes, while autoexec
files are processed immediately after SAS initializes.
• User can edit the default configuration file to add or to change the system
option settings, or can create own project specific configuration file.
• Then user can specify own project specific configuration file to act as the
configuration file, thus overriding the default SASV9.CFG file.
SASV9.CFG
11. 11
SASV9.CFG
• For, The English language, the default configuration SASV9.CFG file is
stored in "SASFoundation9.2nlsensasv9.cfg".
13. 13
AWSTITLE
• Syntax
-AWSTITLE "title-text"
> "Title-text" specifies the text that appears in the title bar of the main
SAS window.
> The text must be enclosed in either single or double quotation marks.
-awstitle "ConSPIC 2013"
15. 15
SPLASH and SPLASHLOC
• Syntax
-SPLASH | -NOSPLASH
> Specifies whether to display the splash screen (logo screen) when SAS starts.
• -SPLASHLOC DLL-name <res-number> | BMP-filename
> Specifies the location of the splash screen bitmap that appears when SAS starts.
-SPLASHLOC "C:usersdesktopConSPIC 2013ConSPIC.bmp"
16. 16
SASINITIALFOLDER
• Syntax
-SASINITIALFOLDER "path of location"
> specifies the path of the project folder as the default folder for the
Open and Save As dialog boxes.
> If path contains spaces, it must be enclosed in quotation mark.
-SASINITIALFOLDER "C:UsersDesktopConSPIC 2013"
17. 17
RSASUSER
• Syntax
-RSASUSER| -NORSASUSER
> RSASUSER limits access to the Sasuser data library to read-only access.
• So, By defining RSASUSER, User can avoid these note and warnings while
opening multiple SAS Sessions and parallel executing batch mode.
18. 18
REGISTER
• Adds an application to the Tools menu in the main SAS window.
• If file path contains space then put path in single inverted quotation and
add double quotation with one space as prefix and suffix.
-register "SAP" " 'C:UsersDesktopConSPICsap v1sap.docx' "
-register "Mock Shell" " 'C:UsersDesktopConSPICshellmock shell.rtf' "
-register "Protocol" " 'C:UsersDesktopConSPICprotocolprotocol.pdf' "
19. 19
Combine all these options to append default SASV9.CFG
and Create a New Project specific ConSPIC2013.CFG file
21. 21
Dynamic process to initialize project specific SAS session
1
Just execute (double-click)
Project Specific Shortcut File
Ready to work
Project specific SAS Session
Final
Windows Shortcuts
• Shortcuts are one of the handiest features on the Windows operating system.
• The shortcuts can be kept on the desktop or inside a special folder.
• Double-clicking the icon makes it very convenient to activate the application
without keeping track of the application’s actual location.
22. 22
1. Make a copy from the existing SAS shortcut on the desktop.
2. Right-click on the desktop and click New on the context menu, and then
select Shortcut on the extended submenu. Click the Browse button to
find the sas.exe file in the !SASROOT directory.
3. Using Shell Scripting or Windows Scrip Host.
A SAS shortcut can be created in a
number of different ways:
23. 23
It is very convenient to open multiple project
specific SAS Sessions from location.
But sometimes it will lead to major human error
like transfer of one project code to other project.
How to restrict only one project specific
SAS Session at a time?
24. 24
VB Script Shortcut
• VBScript has been pre-installed in every Windows OS since Windows 98
• It is very simple to create. Create New Notepad file and put below code in text
file and SAVE AS file with .vbs file extension.
Set WshShell = WScript.CreateObject ("WScript.Shell")
Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from Win32_Process")
For Each objProcess in colProcessList
If objProcess.name = "sas.exe" then
vFound = True
End if
Next
Select case vFound
case True
WshShell.Run("taskkill /im sas.exe /t")
case else
WshShell.Run("D:sassas.exe -config 'C:UsersDesktopConSPIC 2013ConSPIC2013.CFG' ")
End Select
It will check whether any
SAS Session open or Not?
IF True, Then it will ask to
Close first Session
Else, It will initialize Project Specific SAS Session
25. 25
Benefits
• Dynamic process(single step process) is helpful to save time.
• Just one time creation of customize project specific config file like autoexec
file is helpful to optimum use of SAS system options.
• Direct Access to project specific documents from SAS window, is very
convenient and user-friendly.
• Specifying latest working version of documents(like SAP, Mock Shell) in Tools
Menu bar is reducing ambiguity regarding project specific documents.
• Prevent major human error by allowing only One Project Specific SAS
Session at a time.
26. 26
References
• Cheng, Wei (2003). “Build a SAS Development Environment under Windows,”
Proceedings of the 28th annual SAS Users Group Conference
http://www2.sas.com/proceedings/forum2007/063-2007.pdf
• Crawford, Peter (2007) “Easy SAS Session Customization,” Proceedings of the
27th annual SAS Users Group Conference
http://www2.sas.com/proceedings/forum2007/051-2007.pdf
• Hurley, George J. (2007). “Customizing Your SAS Initialization,” Proceedings
of the 27th annual SAS Users Group Conference
http://www2.sas.com/proceedings/forum2007/063-2007.pdf
• Thatcher, Clark (2010). “Make Your SAS Code Environmentally Aware,”
Proceedings of SAS Global Forum 2010
http://support.sas.com/resources/papers/proceedings10/090-2010.pdf