Jan's Blog

Category: SAS

Creating a temporary SAS array of dynamic size

Arrays in SAS are incredibly useful things. For example, if you’re dealing with a concomitant medications dataset and want to check for certain medicines across multiple columns, you’d be hard-pressed to find a faster method than using arrays! Within the SDTM.CM domain, medication names are spread across several columns, usually: CMTRT (Reported Name of Drug, […]

Significant Figures in SAS

For three significant figures, the SAS Institute provides the following code snippet to accomplish the task. However, it is often useful to round to more or less than 3 significant figures. I’ve developed a macro to do so for my own use and am sharing the code below.

Searching for a string in an entire SAS library

For the most part, experienced SAS programmers know where to look for the source data they need. In the pharmaceutical industry, we are familiar with CDISC standards and data structures. However, should the data standard be unfamiliar or the source datasets include new or unusual parameters, it may be prudent to have SAS look through […]

NONMEM ADDL Calculation and Compression in SAS

ADDL represents the number of additional doses that are copies of the current row, with the time since first dose (RTFD) increased at the regular dosing interval (II). This allows for the compression of dose records in the NONMEM dataset. To put it more eloquently: The NONMEM data item ADDL on a dose record expresses […]

SAS and the Forward Re-scan Rule

The “Forward Re-scan Rule” (FRR) is used by SAS to resolve macro variables over several passes. This is especially useful when having one macro variable point to another macro variable, or when trying to resolve numbered macro variables. The SAS Advanced Prep Guide summarises the FRR as follows: Example: numbered list of macro variables To […]

Back to top