![]() | ![]() | ![]() |
Using a stored process in an information map gives an administrator the ability to use existing SAS code. Sometimes this SAS code contains sensitive information like passwords included in a SAS library reference. By converting the code to a secure stored macro, the code can be executed within the stored process, but the actual SAS code is not contained in any logs.
The following display illustrates this process:

This sample uses the CLASS table in the SASHELP library.
The key to hiding your code is using the SECURE and STORE options on the %MACRO statement. The SECURE option prevents the code from ever being seen once compiled. The STORE option saves the compiled macro to the location specified in the LIBNAME statement. In this sample, the library is named maclib.
/* Substitute a valid path for your environment */
LIBNAME maclib 'C:\SAS\EBI\Lev1\SASMain\SASEnvironment\SASMacro';
OPTIONS MSTORED SASMSTORE=maclib ;
%MACRO sample / SECURE STORE ;
LIBNAME BIOUT (WORK) ;
Proc SQL noprint;
Create Table BIOUT.class as
SELECT *
FROM
sashelp.CLASS;
quit;
%MEND sample;
|
*ProcessBody;
%stpbegin;
LIBNAME maclib 'C:\SAS\EBI\Lev1\SASMain\SASEnvironment\SASMacro';
OPTIONS MSTORED SASMSTORE=maclib ;
%sample;
%stpend;
|
For a list of available documentation for SAS Information Map Studio, see http://support.sas.com/documentation/onlinedoc/ims/index.html.
For more information about the SAS macro language, see the documentation for Base SAS at http://support.sas.com/documentation/onlinedoc/base/index.html.
For more information about SAS stored processes, see the SAS 9.1.3 Integration Technologies: Developer's Guide at http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/index.html.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
| Type: | Sample |
| Topic: | System Administration ==> Security Data Management ==> Data Sources ==> Information map SAS Reference ==> Macro |
| Date Modified: | 2008-10-13 14:25:23 |
| Date Created: | 2008-10-08 15:40:58 |
| Product Family | Product | Host | Product Release | SAS Release | ||
| Starting | Ending | Starting | Ending | |||
| SAS System | SAS Information Map Studio | Microsoft® Windows® for x64 | 3.1 | 9.1 TS1M3 SP4 | ||
| Microsoft Windows 2000 Advanced Server | 3.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows 2000 Datacenter Server | 3.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows 2000 Server | 3.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows 2000 Professional | 3.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows Server 2003 Datacenter Edition | 3.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows Server 2003 Enterprise Edition | 3.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows Server 2003 Standard Edition | 3.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows XP Professional | 3.1 | 9.1 TS1M3 SP4 | ||||
| Windows Vista | 3.1 | 9.1 TS1M3 SP4 | ||||


