Archive for August, 2009

Whats your favourite SAS Forum Paper? Comment if you have got the time!

Aug
19

Every now and again when I get some spare time I troll through the SAS forum papers to see what gems I can find.

Robert Meekings posted a comment on my blog post about the Thotwave Administration paper I liked, highlighting it was very similar to a paper they did at SF 2008.

So that got me thinking how many other great papers are there hiding in the SAS Forum archive, that I (and others) have never seen?

So a question to anybody who cares to respond, post a comment linking to your favorite SAS Forum paper and a short description why it is your favorite. Lets see what gems are hiding out there.

(And a note to all the comment spammers out there, neither I or other SAS users are interested in little blue pills or other such things, and comments are not automatically posted, so don’t bother – can’t believe how many Spam comments people waste their time entering.)

(in fact here is a suggestion to the blog spammers out there (well a polite one anyway I cant post my other suggestions) go out and buy the how to use SAS Enterprise Guide book, read it, learn the tool and then work with customers who need help getting insight from their data, you will earn more and have a much more enjoyable life!)

Share
Posted by  
2 Comments

Scheduling in SAS 9.2

Aug
19

Suzanne posted a comment about the changes in LSF renewals that are about to happen.

Made me think about the new scheduling capability that has been bundled in SAS 9.2, so I did a little searching on the SAS Support site.

On the About Scheduling Servers page they provide a good overview of the different options which are available, which are:

  • LSF (Platform Process Manager)
  • Operating System (guessing Cron for Unix and Windows Scheduler)
  • In-Process scheduling server (which is a new part of SAS 9.2)

So what does the In-Process scheduling server cover?

Well according to most of the support pages it only refers to Web Report Studio, but back on the About SAS Scheduling page it mentions:

  • SAS Data Integration Studio
  • SAS Web Report Studio
  • SAS Marketing Automation
  • And custom SAS code

I notice Enterprise Miner models are missing, I am guessing you could schedule them as custom SAS code but I do wonder if it just wasn’t mentioned because EM 6.1 was released slightly after the initial 9.2 release.

Although I did check out the What new in Enterprise Miner 6.1 page and nothing was mentioned.

Ps. There is a great flow diagram (well ok the graphics aren’t that great but you know what I mean) on the Overview of the Scheduling Process page which shows how the new scheduling all hangs together.

It reminded me of the internal presentations SAS had on flow a transaction went through when it came to Authentication and Authorisation of the SAS environment. It was the only way I finally got to understand how it all hug together, so I am a great fan of process flow diagrams.

Which is one of the reasons I liked LSF because you could see a graphical flow, and its great to see the new SAS In-Process scheduling server has graphical process flow, and they look much sexier than the LSF ones (and yes this is important!). Check out an example of the Specifying Dependencies page

Share
Posted by  
0 Comments

SAS Administration

Aug
17

I am always amazed at how many people under estimate the level of administration that the SAS 9.x platform now requires.

I think it stems from the old SAS 8 environment that really managed itself.

But SAS 9.1 and 9.2 is a multi tier environment with lots of moving parts and so you really need a dedicated (even if it is only part time) administrator to make sure it is humming.

Thotwave have a great paper titled SAS® Administration, More relevant than ever that provides a good explanation of what this role needs to achieve.

And of course any administrator should also attend the SAS PA Fast course as well.

It also looks like in SAS 9.2 there are lots of great changes to make administrating the SAS environment easier.

Even if you decide to have one of your analytic or business users manage your environment, still send them on the training. It will save them a lot of time and you a lot of money.

Share
Posted by  
3 Comments

If you use LSF be afraid, be very very afraid

Aug
05

Interesting note over on the SAS Support site here:

http://support.sas.com/techsup/pcn/index.html

At the bottom it says:

Platform Suite for SAS (LSFSUITE)

Effective September 1, 2009 Platform Suite for SAS (“LSFSUITE”) will no longer be included in the price of previously licensed SAS solution or technology packages. Customers who wish to continue use of LSFSUITE, will have until 90 days from the expiration date of their SAS solution or technology package to license this product at then-current renewal fees. This will be accomplished by executing the necessary licensing documents for LSFSUITE and paying the applicable then-current renewal fees (“migration plan”). Please call 1-800-727-0025 to initiate the process of establishing a license for LSFSUITE prior to expiration of the migration plan. No further action is required for those customers who do not wish to take advantage of this migration plan.

So as I read this if you have LSF in one of your bundles that you currently pay renewals for, then you need to use the “migrate plan” and pay the LSF portion of the renewals to Platform Computing.

No mention on what happens to your SAS renewals though.

Let me know if you find out.

Share
Posted by  
3 Comments

Monotonic (part duex)

Aug
04

Kevin Myers posted a comment on our monotonic post, which provided a lot more detail on the monotonic function (thanks Kevin) so I thought I would post them as an article.

Kevin says….

Here are some very preliminary unpublished docs that were put together when MONOTONIC was added in SAS 8.2. This has not received any official testing/verification/approval by SAS Institute personnel:

MONOTONIC

Returns a series of monotonically increasing values

Category: Special (Is this the right category?)
Syntax
Arguments
Details
Examples
Example 1: Creating Row Identifiers for a Simple SQL Query
Example 2: Generating Distinct Streams of Values
Example 3: Influencing MONOTONIC Evaluation with Arguments
See Also

Syntax

MONOTONIC(>>)

Arguments

argument
is any valid numeric or character expression. No arguments are required, but any number of arguments may be provided.

Details

The MONOTONIC function returns the series of monotonically increasing integers (1, 2, 3, …). Each time the function is evaluated, it returns the next integer from the series. It is particularly useful for returning a series of values that may be used for purposes such as dynamically generating row identifiers or counters in PROC SQL. See Generating Row Identifiers for a Simple SQL Query.

To generate a series of values that does not start with 1 or does not increment by 1, you may wish to create an expression that applies an offset and/or a multiplier to the values that are returned from the MONOTONIC function.

Each separate use of the MONTONIC function within a data step or SQL query will return a separate series of values. If values from the same MONOTONIC series are required at multiple points within the same data step or SQL query, then a variable should be used to store the result of a single call to the MONOTONIC function, and that variable can then be used to provide the additional values where they are required. See Generating Distinct Streams of Values.

Arguments that are passed to the MONOTONIC function have no direct impact on the series of values that is returned. Instead, these arguments may be optionally provided in order to serve as hints for PROC SQL to help influence when the MONOTONIC function will be evaluated during query processing. One must be cautious when using MONOTONIC in a complex PROC SQL query, because join processing, subsetting, and query optimization may have results that are difficult to predict. See Influencing MONOTONIC Evaluation with Arguments.

Examples

Example 1: Generating Row Identifiers for a Simple SQL Query

The following program illustrates generating a unique identifier for each row that is returned as the result of a simple SQL query:

data test;
do x=1 to 5;
output;
end;
run;

proc sql;
select *, monotonic() as rowid from test
having x ne 3;
quit;

The SAS System 10:00 Thursday,
August 5, 1999 10

x rowid
ffffffffffffffffff
1 1
2 2
4 4
5 5

Note in the output from the above example that the value of rowid skips from 2 to 4. This is because the data row for which the rowid value of 3 was generated by the MONOTONIC function was deleted by the HAVING clause after the function had already been evaluated for that row. Using a simple WHERE clause such as WHERE X NE 3 would not produce the same result, because the third data row would have been skipped entirely, and the MONOTONIC function would not have been evaluated at all for that row. This shows that when it is important for values resulting from use of the MONOTONIC function in an SQL query to maintain a constant increment with no skipped values, one must carefully consider the effects that any joins or subsetting criteria may have on the results.

Example 2: Generating distinct streams of values

The following program illustrates that independent streams of values are returned by each separate use of the MONOTONIC function. A data step is used here to illustrate this point for simplicity, but similar situations can also occur with multiple uses of MONOTONIC within a single SQL statement.

data _null_;
do x=1 to 2;
a=monotonic();
do y=1 to 2;
b=monotonic();
put x= y= a= b=;
end;
end;
run;

x=1 y=1 a=1 b=1
x=1 y=2 a=1 b=2
x=2 y=1 a=2 b=3
x=2 y=2 a=2 b=4
NOTE: DATA statement used:
real time 0.02 seconds
cpu time 0.02 seconds

Note the differing values for variables a and b which were generated by two different calls to the MONOTONIC function, one in the outer DO loop for the data step, and the other in the inner DO loop.

Example 3: Influencing MONOTONIC Evaluation with Arguments

The following example shows that it is possible to influence when evaluation of the MONOTONIC function occurs in an SQL query by providing arguments.

data test1;
do x=1 to 5;
output;
end;
run;

data test2;
do x=0 to 6 by 2;
output;
end;
run;

proc sql;
select t1.x,
monotonic() as m,
monotonic(t1.x) as m1,
monotonic(t2.x) as m2,
monotonic(t1.x,t2.x) as m12
from test1 t1, test2 t2
where t2.x=t1.x;
quit;

The SAS System 10:00 Thursday,
August 5, 1999 14

x m m1 m2 m12
ffffffffffffffffffffffffffffffffffffffffffffffff
2 1 2 2 1
4 2 4 3 2

Note in the output from the above example that providing different arguments to the MONOTONIC function calls caused them to be evaluated at different points during the query processing according to the table dependencies of the arguments, thereby resulting in different values for each call in the resulting joined data.

CAUTION: Even though it is often possible to successfully influence the evaluation order of the MONOTONIC function in a predictable manner as shown above, one must be very careful when attempting to do so. In complex queries, the SQL query optimizer may alter the apparent evaluation order to improve performance. Care should be taken when developing any SQL queries that use the MONTONIC function which also involve joins and/or subsetting criteria, to be certain that the results from using the MONOTONIC function are as intended. Furthermore, differences in query optimization between different releases of the SAS System could produce different results from use of the montonic function in the same SQL query.

Share
Posted by  
0 Comments