Hello,
I am trying to read in fixed width data from a .txt file. I am following the documentation from help infix. Here is my code:
This returns the error "using invalid varname." The infix documentation indicates that it is necessary to include "using" after "dictionary," so I do not understand why it is interpreting using as a variable name. Alternatively, I get the error message "Status.txt invalid name when I delete "using" from the first line of code.
I have also tried to avoid this problem by coding in a different way:
When I do this Stata says that the dictionary is invalid.
Thank you.
I am trying to read in fixed width data from a .txt file. I am following the documentation from help infix. Here is my code:
Code:
infix dictionary using Status.txt { id 1-9 name 10-32 filedate 33-40 agency 41-44 station 45-53 age 54-59 years since degree 60-65 education level 66-67 pay plan 68-69 } infix using Status.txt, clear
I have also tried to avoid this problem by coding in a different way:
Code:
infix id 1-9 name 10-32 filedate 33-40 agency 41-44 station 45-53 age 54-59 yearssincedegree /// 60-65 educationlevel 66-67 pay plan 68-69 using 1973-09-to-2014-06\dod\status\Status.txt
Thank you.
Comment