When you open an information map from SAS Enterprise Guide 4.1 or the SAS Add-In 2.1 for Microsoft Office, you can apply static filters that are built into the information map, but you do not have access to prompted filters. This sample describes how to use a stored process in order to gain the ability to interactively specify filter values when you open the information map.
Note: Beginning with version 4.3, SAS Enterprise Guide and the SAS Add-In support prompted filters in information maps. In addition, you can create custom filters that persist for the current session (see SAS Note 42032).
You must be able to perform tasks in SAS® Management Console. You must know how to register a stored process and a table in metadata. This sample uses the SASHELP.CLASS table, which is shipped with SAS.
In SAS Information Map Studio, insert the columns from the SASHELP.CLASS table and save the information map as Class_Map
.
Use the following sample code to create a stored process that prompts the user to specify a value for the Sex
variable.
*ProcessBody;
%stpbegin;
%global sex;
/* use the IMLE (Information Map Libname Engine) to connect to map */
libname mylib sasioime metauser=sasdemo
metapass=Password1234
metaserver=myserver.com
metaport=8561
mappath="/BIP Tree/ReportStudio/Maps"
metarepository=Foundation;
/* print the map and apply the value of the sex prompt that is passed in */
|
In SAS Management Console, use the New Stored Process Wizard to register the stored process. During the registration, add a parameter (prompt) named sex
.
Note: See Managing Stored Process Metadata: Registering the Stored Process Metadata.
M
Because the credentials are hard coded into the stored process, this sample introduces some security concerns. To hide the credentials, you can create a SAS macro using the SECURE option and reference the macro in the stored process. The contents of the macro are not revealed to the user. For more information, see SAS Sample 33559.
For more information about registering tables, see Connecting to Common Data Sources: Registering and Verifying Tables.
For more information about using SAS Enterprise Guide, see the SAS Enterprise Guide documentation page.
For more information about using the SAS Add-In for Microsoft Office, see the SAS Add-In for Microsoft Office documentation page.
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: | Software Components ==> SMC Plug-in Third Party ==> Products ==> Microsoft Office Query and Reporting ==> Interactive Querying Query and Reporting Data Management ==> Data Sources ==> Information map Data Management ==> Data Sources ==> Metadata |
Date Modified: | 2009-06-15 10:45:19 |
Date Created: | 2009-06-09 23:03:39 |
Product Family | Product | Host | Product Release | SAS Release | ||
Starting | Ending | Starting | Ending | |||
SAS System | SAS Add-in for Microsoft Office | Microsoft Windows 2000 Advanced Server | 2.1 | 9.1 TS1M3 SP4 | ||
Microsoft Windows 2000 Datacenter Server | 2.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Server | 2.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Professional | 2.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows NT Workstation | 2.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Datacenter Edition | 2.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Enterprise Edition | 2.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Standard Edition | 2.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows XP Professional | 2.1 | 9.1 TS1M3 SP4 | ||||
Windows Vista | 2.1 | 9.1 TS1M3 SP4 | ||||
SAS System | SAS Enterprise Guide | Microsoft Windows 2000 Advanced Server | 4.1 | 9.1 TS1M3 SP4 | ||
Microsoft Windows 2000 Datacenter Server | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Server | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows 2000 Professional | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows NT Workstation | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Datacenter Edition | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Enterprise Edition | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows Server 2003 Standard Edition | 4.1 | 9.1 TS1M3 SP4 | ||||
Microsoft Windows XP Professional | 4.1 | 9.1 TS1M3 SP4 | ||||
Windows Vista | 4.1 | 9.1 TS1M3 SP4 |