Friday, February 18, 2011

Tell to SAS, what new features you are expecting in next versions - They will listen to you!!

Following are the few words from Annette Harris, Vice President of SAS Institute Technical Support regarding SASware Ballot®

"The SASware Ballot is a global survey in which you, our customers, vote for the enhancements to SAS software and services that you want to see implemented. Ballot items are added to the survey based on suggestions that customers submit to SAS throughout the year.
SAS is pleased to unveil the new online SASware ballot! With this new format, SAS can continuously update the ballot with new suggestions as you submit them. Therefore, your input can drive our development efforts throughout the year. This new format also enables you to provide additional information about particular ballot items or categories of items through the comments features. As SAS collects voting data on the ballot items, this information will be available to you in real time so you can see how your colleagues are voting. So please visit and vote often.

Thank you for taking the time to let us know what's on your mind. Your input reinforces our knowledge about the software features that are important to you, your priorities, and your business needs. Through customer interactions and information sharing, we make ideas come to life and thus create even better software. Your input DOES make a difference."

For more information and to view all the new features people like you suggested, please visit http://support.sas.com/community/ballot/

Monday, February 14, 2011

Range of values : IN operator

Beginning in SAS 9, a range can be used with the IN operator. For
example:

if x in(1:3,5) then y=2;

is equivalent to:

if x in(1,2,3,5) then y=2;

Usage of Macro variable SQLOBS

Macro Variable:
sqlobs

Short Description:
Automatic macro variable. Returns the number of rows processed by an SQL statement.

Scenario Description:
Many a times after creation of a table, we need to take its count and store it in a macro variable.

 One approach is to take “select count * from table”.

But this is approach is time consuming.
Alternatively, we can use the automatic macro variable “sqlobs”.

 The automatic macro variable SQLOBS is assigned a value after the SQL SELECT statement executes.

We can directly refer the value of this macro variable to store the count.

Example:

data Marks_sub;
input Id Marks;
datalines;
100 50
101 70
102 30
106 40
;
proc sql;
create table Pass as
select
*
From Marks_sub
where Marks > 40;
quit;

%let count=&sqlobs;
%put Number of rows = &count;

Here two rows qualify the criteria and thus are processed by the sql statement.
In log the message comes as mentioned below:

%put Number of rows = &count;
Number of rows = 2