Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4

As the syntax of the INVALUE, PICTURE, and VALUE statements indicates, you must specify values as value-range-sets . On the left side of the equals sign you specify the values that you want to convert to other values. On the right side of the equals sign, you specify the values that you want the values on the left side to become. This section discusses the different forms that you can use for value-or-range , which represents the values on the left side of the equals sign. For details about how to specify values for the right side of the equals sign, see the Required Arguments section for the appropriate statement.

The INVALUE, PICTURE, and VALUE statements accept numeric values on the left side of the equals sign. INVALUE and VALUE also accept character strings on the left side of the equals sign.

As the syntax shows, you can have multiple occurrences of value-or-range in each value-range-set , with commas separating the occurrences. Each occurrence of value-or-range is either one of the following:

value

range

Each value-or-range can be up to 32,767 characters . If value-or-range has more than 32,767 characters, then the procedure truncates the value after it processes the first 32,767 characters.

Note: You do not have to account for every value on the left side of the equals sign. Those values are converted using the default informat or format. For example, the following VALUE statement creates the TEMP. format, which prints all occurrences of 98.6 as NORMAL :

value temp 98.6='NORMAL';

If the value were 96.9, then the printed result would be 96.9 .

Категории