Hello All,

I am trying to import d.ta file and append them, what is wrong with this code? For some reason it only uses the first file from 1995, but does not continue with the subsequent years. Thanks in advance

clear all
cd "mydir"
save file_all_green, replace emptyok
forvalues i= 1995(1)2018 {
use country_partner_hsproduct6digit_year_`i',clear
keep year export_value location_code partner_code hs_product_code
append using "file_all_green"
save file_all_green,replace
}