I have a dataset in .txt, which I have to translate with a dictionary file. I have written the dictionary file according to instructions from the owners of the dataset. However, there seems to be a problem with one variable (that I know of, but there might be other problems too). The variable STDIND presents with missing observations (about 80% of all observations), even though it should not. If I run the code in R (written in R language) it works, without giving me missing values, so there must be a problem with my Stata code (and I have to use Stata). This is how I wrote the dictionary file:
Code:
dictionary {
_column(1) int    ANNO    %4f "ANNO"
_column(5) int    TRIM    %1f "TRIM"
_column(6) int    REG    %2f "REG"
_column(8) int    numcff    %2f "SG4"
(...)
_column(587) int    STDFAM    %6f "STDFAM"
_column(593) int    STDIND    %6f "STDIND"
_column(599) int    NN2    %1f "NN2"
_column(600) int    RPN2    %1f "RPN2"
_column(601) int    TF    %2f "TF"
_column(603) int    TN2    %1f "TN2"
_column(604) int    F0_14    %1f "F0_14"
_column(605) int    CP0_7    %1f "CP0_7"
_column(606) int    CITTAD    %1f "CITTAD"
_column(607) int    WAVQUA    %1f "WAVQUA"
_column(608) int    nasita    %1f "SG13"
_column(609) int    citita    %1f "SG16"
_column(610) int    annres    %3f "SG18"
_column(613) int    NASSES    %3f "NASSES"
_column(616) int    CITSES    %3f "CITSES"
_column(619) int    RAPSES    %3f "RAPSES"
}
And this is the code I used to apply the dictionary file (2005_Q2_dict.dct is the dictionary file, sta_2005_2.txt is the dataset in txt):

Code:
clear
infile using "$PathDict/2005_Q2_dict.dct", using("$Path05Q2/sta_2005_2.txt")
Is there a problem with the code? Am I doing something wrong, or missing something?