Hi All,
Some time back, I had used -outfixt- by Austin Nichols to perfectly
export fixed width files as txt.
Now, I don't need to export my data set as a fixed width file but it
needs to be "|" (pipe) delimited and the blank fields, if formatted as
%10s need to be 10 in length. In addition, if a field is formatted as 10
spaces long and only 8 of the designated spaces are being used, it still
needs to be exported with 10 as its width.
While getting the file to be pipe delimited is not a problem, I am
struggling to keep the designated widths of the field in the txt
exports. Stata reduces the width of a field: a field formatted %10S only
occupies 8 spaces in the txt file if that's how long the elements of the
field are. But I need it to be 10 in length, which is when -outfixt-
came to mind. But, -outfixt- does not have a delimited option available.
Is there a way to use -outfixt- with a delimited or any other way in
Stata to keep the length of fields in txt exports as you specified and
formatted in Stata? Please provide some insight.
Lastly, the blank fields are populated by dots. Is there a way to make
the blank fields be populated by a space? One space when the field is 1
in length and 5 when it is 5. Thanks so much in advance everyone.
-Prash.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/