Ricardo Ovaldia asked about the formated -string()- function:
--------------------begin excerpted post---------------------------------
. gen y=string( a1,"%16")
(5 missing values generated)
What I'm doing wrong? -y- is missing everywhere.
---------------------end excerpted post-----------------------------------
The formatted string function needs to have the format specified as a
numeric type, that is, "%16.0f" and not "%16".
Joseph Coveney
----------------------------------------------------------------------------
. do "A:\string.do"
. clear
. input float rec long a1
rec a1
1. 1. 12345678
2. 2. 12345679
3. 3. 12345678
4. 4. 12345678
5. 5. 12345679
6. end
. generate y = string( a1,"%16.0f")
. slist
rec a1 y
1. 1 12345678 12345678
2. 2 12345679 12345679
3. 3 12345678 12345678
4. 4 12345678 12345678
5. 5 12345679 12345679
. exit
end of do-file
----------------------------------------------------------------------------
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/