With Due Respects to the OP:
The SAS macro variable "inspector" is a custom task that plugs into SAS Enterprise Guide 4.3. You can use it to view the current values for all SAS macro variables that are defined within your SAS session. You can also evaluate "immediate" macro expressions in a convenient quick view window. If you develop or run SAS macro programs, this task can be a valuable debugging and learning tool.
This post is to put a tab on this feature for me to try.
http://blogs.sas.com/content/sasdummy/2011/11/22/inspecting-sas-macro-variables-in-sas-enterprise-guide/
My SAS BI Blog
Warning-- Geek Content
This is a blog is more or less a scrap book of my SAS Knowledge.
Monday, December 5, 2011
Thursday, June 9, 2011
A SAS Stored Process Web Application that exports a Dataset to an Excel sheet
While creating Drill down reports, you might need to provide the users with the option of downloading the entire data to an excel sheet. For this you may need to create an interface(Code) where the Export button is displayed and a stored process that converts the Dataset to the excel sheet.
/******Code for Converting the data to excel ******/
data _null_;
rc=stpsrv_header('Content-type','application/vnd.ms-excel');
rc=stpsrv_header('Content-disposition','attachment; filename=temp.xls');
run;
ods tagsets.excelxp file=_webout style=sasweb options(embedded_titles="yes"
embedded_footers="yes"
print_header='&B&CThis is a test'
print_footer='&B&CThis is a footer printed on &D');
title "Export To Excel";
proc print data=&DSN ;
run;
ods tagsets.excelxp close;
/******Code for Converting the data to excel ******/
data _null_;
rc=stpsrv_header('Content-type','application/vnd.ms-excel');
rc=stpsrv_header('Content-disposition','attachment; filename=temp.xls');
run;
ods tagsets.excelxp file=_webout style=sasweb options(embedded_titles="yes"
embedded_footers="yes"
print_header='&B&CThis is a test'
print_footer='&B&CThis is a footer printed on &D');
title "Export To Excel";
proc print data=&DSN ;
run;
ods tagsets.excelxp close;
Tuesday, April 26, 2011
Set up Event based Interactions between the Indicators in SAS BI Dashboard 4.3
Setting up the interaction between multiple indictors is a cool new feature in SAS BI Dashboard 4.3, It is similar to events for anyone who is familiar with the Java script will be familiar with ONCLICK, ONCHANGE etc. events.
In this Example I have two separate indicators which have been dragged on a Dashboard. The two Indicators have separate data sources. A Dynamic List box Indicator which has a SAS Table SASHELP.CLASS as data source. A Spark Table indicator a Stored Process which accepts Sex parameter as a data source No default value is required, the STP code should return all the rows if no value are passed in the parameter (In order to apply Client side filter).
I want to set up an Interaction between the two so that the selection in the Dynamic List box will change the values in the Spark table.
In order to set up an interaction select the Source indicator in our case the Dynamic list, Edit -> Set up Interactions.
There the selected Indicator becomes the source and the rest of the indicators become targets, the source and the target parameters have to be selected.
If you check the Show Interactions Check box in the Dashboard properties the interaction between the Indicators will be displayed as arrows.
The final output looks like this when viewed from the dashboard viewer, the data in the spark tables are updated as per the selection in the Dynamic List prompt.
In this Example I have two separate indicators which have been dragged on a Dashboard. The two Indicators have separate data sources. A Dynamic List box Indicator which has a SAS Table SASHELP.CLASS as data source. A Spark Table indicator a Stored Process which accepts Sex parameter as a data source No default value is required, the STP code should return all the rows if no value are passed in the parameter (In order to apply Client side filter).
I want to set up an Interaction between the two so that the selection in the Dynamic List box will change the values in the Spark table.
In order to set up an interaction select the Source indicator in our case the Dynamic list, Edit -> Set up Interactions.
There the selected Indicator becomes the source and the rest of the indicators become targets, the source and the target parameters have to be selected.
If you check the Show Interactions Check box in the Dashboard properties the interaction between the Indicators will be displayed as arrows.
The final output looks like this when viewed from the dashboard viewer, the data in the spark tables are updated as per the selection in the Dynamic List prompt.
Monday, April 25, 2011
How to set a Stored Process as a Data source to SAS BI Dashboard 4.3
The new look and feel of the SAS BI Dashboard Ver 4.3 leaves you Awe struck, this time SAS have come up with something extra ordinary and Out of the box. The great news is that this time the Dashboard have a lots of Interactive features which the end user would love to see it, though the earlier version of the Dashboard have some interactivity which come with a lot of coding in the background.
However this time around SAS has given an option for the Developers to set the Stored Process as a data source to the dashboards which helps us in leveraging the power of the SAS Stored process with the Dashboard.
The stored process which needs to be created for the Dashboards are somewhat different than the ones that are used for other applications let us find out how.
Let us look at this sample code.
In this code the dataset is being published (Please refer to SAS Publication framework for more information ) to an implicit location. The published package will be in .SPK format, and you can publish multiple datasets to the same Package. Make sure that the Stored process macros (%STPBEGIN,%STPEND) have been turned off.
Let us now see how to access the stored process from the Dashboard Interface
In the SAS BI Dashboard Go to File ->
New -> Indicator Data.
Select 'Stored Process' as the data source and select your stored process.
In this example you can see that there are multiple datasets that are being published by the Stored Process.
Reference:
Match Made in Heaven: Predictive Analytics and the SAS® BI Dashboard 4.3 support.sas.com/resources/papers/proceedings11/047-2011.pdf
Interactive Dashboards: Powered by Flash and the SAS® Programmer
support.sas.com/resources/papers/proceedings10/045-2010.pdf
However this time around SAS has given an option for the Developers to set the Stored Process as a data source to the dashboards which helps us in leveraging the power of the SAS Stored process with the Dashboard.
The stored process which needs to be created for the Dashboards are somewhat different than the ones that are used for other applications let us find out how.
Let us look at this sample code.
In this code the dataset is being published (Please refer to SAS Publication framework for more information ) to an implicit location. The published package will be in .SPK format, and you can publish multiple datasets to the same Package. Make sure that the Stored process macros (%STPBEGIN,%STPEND) have been turned off.
Let us now see how to access the stored process from the Dashboard Interface
In the SAS BI Dashboard Go to File ->
New -> Indicator Data.
Select 'Stored Process' as the data source and select your stored process.
In this example you can see that there are multiple datasets that are being published by the Stored Process.
Reference:
Match Made in Heaven: Predictive Analytics and the SAS® BI Dashboard 4.3 support.sas.com/resources/papers/proceedings11/047-2011.pdf
Interactive Dashboards: Powered by Flash and the SAS® Programmer
support.sas.com/resources/papers/proceedings10/045-2010.pdf
Friday, April 8, 2011
Setting up SAS to read data that is in the Arabic language
An issue has surfaced when Arabic characters were being Displayed as '????????' in Web Report studio.Further investigation into this (though my peer was thinking that it was some setting with the WRS ) I have found out that SAS was not able to interpret the Arabic character set i.e, in the SAS Dataset itself the Data was being displayed as '?????'.
SAS TS has recommended the following steps that took care of the Issue: Select Start ► Settings ► Control Panel ► Regional and Language Options. Select the Regional Options tab, Standards and Formats, and choose Arabic().
Select the Languages tab and Supplemental language support and check "Install files for complex script and right-to-left languages".
Select the Advanced tab and Language for Non-unicode programs, and select Arabic (). Select the Advanced tab and Code conversion tables, and select each checkbox for the appropriate Arabic settings. Click OK and reboot.
2. Open Windows Explorer, drill to C:\Program Files\SAS\SAS 9.1\nls\en and modify the sasv9.cfg file to include these changes: Comment out these lines as follows: /* Set Windows Locale */ /* -LOCALE "en_US" */ Add the following lines: -encoding="warabic" -locale="ar_SA" .
For further reading click this Link: . http://support.sas.com/kb/18/577.html
SAS TS has recommended the following steps that took care of the Issue: Select Start ► Settings ► Control Panel ► Regional and Language Options. Select the Regional Options tab, Standards and Formats, and choose Arabic(
Select the Languages tab and Supplemental language support and check "Install files for complex script and right-to-left languages".
Select the Advanced tab and Language for Non-unicode programs, and select Arabic (
2. Open Windows Explorer, drill to C:\Program Files\SAS\SAS 9.1\nls\en and modify the sasv9.cfg file to include these changes: Comment out these lines as follows: /* Set Windows Locale */ /* -LOCALE "en_US" */ Add the following lines: -encoding="warabic" -locale="ar_SA" .
For further reading click this Link: . http://support.sas.com/kb/18/577.html
Wednesday, April 6, 2011
Tuesday, April 5, 2011
customizing the SAS Web applications
1. Changing the banner title of the SAS® Information Delivery Portalhttp://support.sas.com/kb/37/734.html 2. Changing the banner title of the SAS® Logon Managerhttp://support.sas.com/kb/37/606.html 3. Changing banner properties for SAS Web Report Studio.http://support.sas.com/documentation/cdl/en/biwaag/63536/HTML/default/viewer.htm#/documentation/cdl/en/biwaag/63536/HTML/default/a002938529.htmlood at the sections : 1.Hide Banner Properties for SAS Web Report Studio 2.Customize the Product and Browser Window Titles for SAS Web Report Studio For Developing custome themes follow the document:http://support.sas.com/documentation/cdl/en/biwaag/63536/HTML/default/viewer.htm#/documentation/cdl/en/biwaag/63536/HTML/default/a003283566.htm
Subscribe to:
Posts (Atom)