Make the character variable long enough to hold the largest value you
expect. When you write the it to the text file, use the COMPRESS
function to remove all the blanks.
From: Huijuan Meng
Sent: Friday, May 22, 2009 2:17 PM
Subject: Re: Convert numeric to character, but don't know the length of
the numeric variable.
Thank you so much for your help, sorry I did not explain my question
Here is my situation:
I have a dataset which contain, say, 1100 variables,
I run some analysis with this data, based on the results, I need to
delete certain variables,
Then I need to find the number of the rest of the variables, it can be
>=1000, or < 1000,
Finally, I need to write a text file which referring to this number a
couple of times, and I don't want any space between this number and
other words in the text file.