"CHRISTENSEN,KEVIN W" <chriske2@UFL.EDU> replied:
> I ended up figuring a way around it...just multiply everything by
> 1. It only works if the characters can be interpreted as numbers.
> And it will likely convert any missing values to zeros
> (thankfully I didn't have any missing values). I'll probably try
> it your way too so I can learn a few things. The code I used is
> below, for posterity's sake.
> data wbdata.pop4;
> set wbdata.pop3;
> array pop (43) _1960--_2002;
> do i = 1 to 43;
> pop(i) = pop(i)*1;
This will cause an implicit character-to numeric conversion and back,
since SAS will not change your variables from character to numeric.
You have to convert and assign that value to a numeric variable. I
think I should also point out that:
 This will NOT convert missing values to zeroes. Just try it.
It can convert missing values listed as a blank into character strings
that look like a period. Which isn't what you wanted above.
 If some of your _nnnn variables are character (due to the way you
read them in) and some are numeric, then your array statement will bomb
out. Your arrays needs to be all numeric or all character.
 In some environments, an 'implicit character to numeric conversion'
note is considered a sign of a problem with the program. People who
written log-checking programs have often included that 'NOTE' as
to be concerned about. You will know better than any of us whether
may be looking over your shoulder because of that log message.
 The previous suggestions have all been really good ideas. You
really ought to read in your flat file and make sure your numbers are
properly processed, rather than having to patch things up after the
fact. And I do thing that the use of INPUT() is better than the
by-one technique above, for several reasons, one of which is clarity of
David Cassell, CSC
Senior computing specialist