If you look at my desk, my addiction will present itself to you clearly. I love sticky notes – any kind, color, or shape. My bottom desk drawer is full of notepads – some never used because I think they are too pretty to write on. The be…
Tag: Coding Tips
Does your SAS code know what time it is? Add a timestamp.
In 1986 the Beastie Boys released their classic debut album, License to Ill, and the last track posed a question: “What’s the time?” The Beasties answered with an anthem, “It’s time to get ill.” I think Peter Cr…
SAS Stored Process: Debugging from the URL
Here’s an excerpt from “The 50 Keys to Learning SAS Stored Processes” book, which is 20% off until Dec 31. When Bad Things Happen to Good Stored Processes When the stored process fails, a standard error message appears with a button…
Code: Keeping Code in the Trunk
Last week while searching for a code snippet through several folders of information, I realized that the code was still on my old computer … ugh! One of my weekend projects was to organize my code examples somewhere – I’m going to …
SAS Stored Process: Shake, Rattle, and a lil’ DelGobbo Style
One of the great things about attending user conferences such as WUSS is that you get to meet all kinds of fun and interesting people. Vince DelGobbo is a witty, smart, and clever SAS developer, who also happens to work at SAS Institute. Vince work…
SAS Administration: Process Data Faster in RDBMS by Buffering the Data in Memory
By default, accessing third party relational databases can be very slow if not configured properly. I recently started using PostgreSQL 9.1, an open source database, to store high volumes of data for my SAS Global Forum 2013 paper. At first it was taking forever to load up data because SAS was inserting 1 row at a time into the database table. After adding a simple option my data processing was off to the races! Buffering Options The SAS INSERTBUFF and READBUFF options will improve ODBC and OLE DB libraries dramatically. By default these are set to 1 and 250 rows respectively for ODBC connections. Other third party databases, such as Oracle, DB2, or MS SQL Server, will probably benefit as well but I have not been able to test. Setting these buffer sizes tells SAS how many rows to buffer in memory before processing. Using the LIBNAME Option These options can be added to the LIBNAME statement to set the buffering sizes for all processing done on tables within the library. Ideally if you have the SAS Metadata server running, your SAS Administrator should set these options through the Data Library manager in SAS Management Console. If you are […]
The post SAS Administration: Process Data Faster in RDBMS by Buffering the Data in Memory appeared first on Business Intelligence Notes for SAS® BI Users.
SAS Stored Process: Benefits of Minimalist Programming
Minimalism SAS stored processes can do a lot. While I haven’t taken on the life of a true minimalist, recently I have come to see the benefits of limiting my stored process source code to just one statement. And the best part of this practice is, I can still do everything I want. When you create a stored process, SAS writes the source code somewhere (see Tricia’s post on where the code is stored). Typically you enter the source code in the stored process wizard. I am now in the habit of typing just one %INCLUDE statement in the source code, and I end up with a stored process window that looks like below. I use the /source2 option to make sure the included code is written to the log. Minimalist Stored Process The full stored process source code ends up as below, because SAS adds a bit of wrapper code: Minimalist Stored Process: Source Code The main code is DoSomething.sas. It has the usual DATA steps, PROC steps, macro calls, maybe even %INCLUDE statements to call other other sub-modules. Minimalist Stored Process: Main Code So what are the benefits? You can store the main SAS code (DoSomething.sas) wherever you want. I’ve been writing SAS code for MUCH […]