If we just need to know if a variable exists in a dataset, we can open the dataset and look for it. If we are feeling fancy, or frustrated trying to find it, we can use a PROC CONTENTS. But sometimes we need to know if a var
|
|
Published Tips
Hash Code Basics - Quick and Efficient Lookups and Merges
Posted by aywconsulting (Editorial / Blog)Hash code is the new, cool thing for creating efficient code when working with very large datasets. Hash code can be used in a myriad of ways, the most common of which is to lookup information from one dataset to use in another or
Macro to parse character string into even parts
Posted by aywconsulting (Editorial / Blog)Sometimes multiple pieces of information are stored in a single variable. Often it becomes necessary to separate the information into the constituent parts. Sometimes we have a delimiter with which to do this, but sometimes the va
Which to Choose, Macro or Array
Posted by aywconsulting (Editorial / Blog)Given a situation where we need to perform the same operation on multiple variables in a dataset, for example, suppose I have 20 variables, call them ratio1, ratio2, ratio3, etc. And I need to convert all the ratios to percentages
Finding the format catalog in your environment
Posted by aywconsulting (Editorial / Blog)Working in an old client's new programming environment, and suddenly nothing is where I expect it to be. The formats were causing me a great deal of grief. I kept adding them to the format catalog but then they were never av
Superscripts in ODS PDF in V9.2
Posted by aywconsulting (Editorial / Blog)With my recent upgrade to SAS v9.2 I discovered, much to my horror, that there was a glitch in ODS PDF that causes lines with a superscript to be double-spaced! My reports contain a lot of superscripts.
The issue report at SA
How to Sum Across Time Without Using Proc Transpose
Posted by admin (Editorial / Blog)I need to count the number of records from TC which will satisfy the below condition. Does anyone know how to do this without using transpose?
Select all records from TC, where EX.EXSTDTC <= TC.TCDTC <= EX.EXENTC. Then sum
Try to LAG() with value being created
Posted by aywconsulting (Editorial / Blog)The code below is meant to calculate the cumulative days of exposure to drug at a specific dose (in this example at 4.5g). The code does not work as expected. The EX4_5L is missing on all records.