I can create a Numbered Range List of numeric type, but not character type.
My code is similar to this:
DATA TestDataset;
INPUT a1-a3 $;
DATALINES;
A B C
;
RUN;
This produces 3 variables – [a1], [a2] and [a3] as expected. However [a3] is character, but [a1] and [a2] are numeric. This leaves me with missing values as per the following table:
a1 a2 a3
. . C
The following code works, but obviously it does not scale nicely.
INPUT a1 $ a2 $ a3 $;
Am I missing something?
I believe you can use the hyphen notation on the length statement to get what you want. You really should use a length statement regardless..otherwise it defaults to $8.