Populating an Array from a SAS Data Set

Overview

In the previous section, the wind chill lookup table was loaded into the WC array when the array was created. In many cases, you might prefer to load an array with values that are stored in a SAS data set rather than loading them in an ARRAY statement. Lookup values should be stored in a SAS data set when the following conditions are true:
  • there are too many values to initialize easily in the array
  • the values change frequently
  • the same values are used in many programs

Example

Suppose you want to compare the actual cargo revenue values in the SAS data set Sasuser.Monthsum to the target cargo revenue values in the SAS data set Sasuser.Ctargets.
Sasuser.Monthsum contains the ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.