Sample 33559: How to Hide Code Used in SAS® Stored Processes That Are Associated with SAS® Information Maps
Overview
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.
Create a Secure Stored Macro
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.
-
Open
SAS and submit the following code.
/* 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;
|
- Create the stored process using the code below, and then register it in SAS®
Management Console to run on a SAS Workspace Server.
*ProcessBody;
%stpbegin;
LIBNAME maclib 'C:\SAS\EBI\Lev1\SASMain\SASEnvironment\SASMacro';
OPTIONS MSTORED SASMSTORE=maclib ;
%sample;
%stpend;
|
Associate the Stored Process with an Information Map
- Associate the stored process with an information map. (For help, see a SAS Sample
26175.)
- Test the information map to make sure that
the information map returns results. If the test is successful, then you have successfully
created code in a stored process that cannot be read.
Additional Documentation
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.
By converting code to a secure stored macro, the code can be executed within the stored
process that is used in the information map, but the actual SAS code is not contained in any logs.
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 |
Operating System and Release Information
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 | |