The %SYSFUNC macro function allows you to access most SAS® functions. In this blog post, I demonstrate how %SYSFUNC can help in your programming needs when a macro function might not exist. I'll also share the formatting feature that is built in to %SYSFUNC and introduce the %QSYSFUNC that masks the returned value.
Tag: SAS Programmers
The release of SAS Viya 3.3 has brought some nice data quality features. In addition to the visual applications like Data Studio or Data Explorer that are part of the Data Preparation offering, one can leverage data quality capabilities from a programming perspective. Here is an overview of SAS Data Quality 3.3 programming capabilities.
SAS Data Studio is a new application in SAS Viya 3.3 that provides a mechanism for performing simple, self-service data preparation tasks to prepare data for use in SAS Visual Analytics or other applications. It is accessed via the Prepare Data menu item or tile on SAS Home. Note: A
It is not laziness—it is efficiency!!! Programmers are often called lazy; we even call ourselves lazy. But we are not lazy, we are just being efficient. It makes no sense to type the same code over and over again or use more keystrokes than are absolutely necessary. Keyboard Macros You
Are you interested in using SAS Visual Analytics 8.2 to visualize a state by regions, but all you have is a county shapefile? As long as you can cross-walk counties to regions, this is easier to do than you might think. Here are the steps involved: Step 1 Obtain a
If Necessity is the mother of Invention, then, perhaps, the father of Automation is Laziness. Automation is all about convenience, comfort, and productivity. Why do it yourself if you can devise something to do it for you! In my previous post Running SAS programs in batch under Unix/Linux, we learned
Most people who work with optimization are familiar with Linear and Integer Programming, to their toolkit they could add Constraint Programming. Constraint Programming is a powerful technique that is used to solve powerful “real-world” problems in a variety of areas, such as, planning, scheduling, DNA Sequencing, computer graphics and natural
This article and accompanying technical white paper are written to help SAS 9 users process existing SAS 9 code multi-threaded in SAS Viya 3.3. Read the full paper, Getting Your SAS 9 Code to Run Multi-Threaded in SAS Viya 3.3. The Future is Multi-threaded Processing Using SAS® Viya® When I first began
The SAS/GRAPH® Annotate Facility is often viewed as a mysterious programming abyss that many SAS users do not wish to dive into, in part because of some not-so-obvious pitfalls that they might experience when using it. I view annotation as a frequently misunderstood and needlessly feared but powerful tool that
Another report requirement came my way and I wanted to share how to use our Visual Analytics’ out-of-the-box relative period calculations to solve it. Essentially, we had a customer who wanted to see a metric for every month, the previous month’s value next to it, and lastly the difference between
While SAS program development is usually done in an interactive SAS environment (SAS Enterprise Guide, SAS Display Manager, SAS Studio, etc.), when it comes to running SAS programs in a production or operations environment, it is routinely done in batch mode. Why run SAS programs in batch mode? First and
Compressing a data set is a process that reduces the number of bytes that are required to represent each observation in a file. You might choose to enable compression to reduce the storage requirements for the file and to lessen the number of I/O operations that are needed to read
PROC FREQ is one of the most popular procedures in the SAS language. It is mostly used to describe frequency distribution of a variable or combination of variables in contingency tables. However, PROC FREQ has much more functionality than that. For an overview of all that it can do, see
During my 35 years of using SAS® software, I have found the CNTLIN and CNTLOUT options in the FORMAT procedure to be among the most useful features that I routinely suggest to other SAS users. The CNTLIN option enables you to create user-defined formats from a SAS data set (input
The CAS procedure (PROC CAS) enables us to interact with SAS Cloud Analytic Services (CAS) from the SAS client based on the CASL (the scripting language of CAS) specification. CASL supports a variety of data types including INT, DOUBLE, STRING, TABLE, LIST, BLOB, and others. The result of a CAS
SAS Viya provides a robust, scalable, cloud-ready, distributed runtime engine. This engine is driven by CAS (Cloud Analytic Services), providing fast processing for many data management techniques that run distributive, i.e. using all threads on all defined compute nodes. Why PROC APPEND is a common technique used in SAS processes.
Have you heard? The ODS Destination for PowerPoint Has a New Option It’s true. The ODS destination for PowerPoint now has the STARTPAGE= option, which provides you with greater control and flexibility when creating presentations. Added to the ODS POWERPOINT statement in SAS® 9.4TS1M4, the STARTPAGE= option enables you to
There is certainly no shortage of terrific tips and tricks in various SAS blogs from some of our most distinguished SAS in-house experts. But, there's another group of equally qualified experts who don't often get to share their expertise on this channel: our customers. So, I went on a quest to get
The purpose of this blog post is to demonstrate a SAS coding technique that allows for calculations with multiple variables and multiple observations across a SAS dataset. This technique can be useful for working with time series, clinical trials, - in any data step calculations involving values from different observations.
A ghoulish Halloween Boo to all my readers! Hope my costume freaks you out, but even if it doesn't, I’m positive PROC FREQ will in a few amazing ways! Today’s Programming 2: Data Manipulation Techniques class asked about the power of PROC FREQ. Since I stopped to explain some of it's benefits to
When loading data into CAS using PROC CASUTIL, you have two choices on how the table can be loaded: session-scope or global-scope. This is controlled by the PROMOTE option in the PROC CASUTIL statement. Session-scope loaded proc casutil; load casdata="model_table.sas7bdat" incaslib="ryloll" outcaslib="otcaslib" casout="model_table”; run; Global-scope loaded proc casutil; load casdata="model_table.sas7bdat"
To improve is to change; to be perfect is to change often.-Winston Churchill If you've visited SAS documentation (also known as the "SAS Help Center") lately, you may have noticed that we've made some fairly significant changes in the documentation for SAS products and solutions. The new site is organized in a new way, search
There are many compelling reasons existing SAS users might want to start integrating SAS Viya into their SAS9 programs and applications. For me, it comes down to ease-of-use, speed, and faster time-to-value. With the ability to traverse the (necessarily iterative) analytics lifecycle faster than before, we are now able to generate
Reading an external file that contains delimiters (commas, tabs, or other characters such as a pipe character or an exclamation point) is easy when you use the IMPORT procedure. It's easy in that variable names are on row 1, the data starts on row 2, and the first 20 rows
“The difference between style and fashion is quality.” -Giorgio Armani With an out-of-the-box SAS Enterprise Guide (EG) installation, when you build a report in SAS EG it is displayed in a nice-looking default style. If you like it, you can keep it, and continue reading. If you don’t quite
Whether you are a SAS code creator, a blogger, a technical writer, an editor-in-chief, an executive, a secretary, a developer or programmer in any programming language or simply someone who uses computer or hand-held device for writing, you need to read this blog post – your life is about to
In my prior posts (Data-driven SAS macro loops, Modifying variable attributes in all datasets of a SAS library, Automating the loading of multiple database tables into SAS tables), I presented various data-driven applications using SAS macro loops. However, macro loops are not the only tools available in SAS for developing
Trivial Pursuit, Justin Bieber and Timbits. Some pretty great things have come from Canada, eh? Well, you can go ahead and add expert SAS programmers to that impressive list. In this video, six Canadian SAS programmers, with more than 115 years of SAS programming experience between them, share some of their favorite, little-known SAS programming tips. You're sure to discover a new trick or
SAS® offers several ways that you can find the top n% and bottom n% of data values based on a numeric variable. The RANK procedure with the GROUPS= option is one method. Another method is The UNIVARIATE procedure with the PCTLPTS= option. Because there are several ways to perform this
Have you ever written a macro and wondered if there was an easy way to pass values to the macro? You can by using macro parameters. Macro parameters enable you to pass values into the macro at macro invocation, and set default values for macro variables within the macro definition.