First time using the national cancer database, trying to figure out how to import a .dat file on mac in Stata 14..
Instructions in do-file that came with .dat file say:
* This program will import the flat PUF text file and assign value and variable labels
*To read in the .dat file and assign variable names and labels in STATA,
*update the syntax in the four places listed in the instructions with the
*location of where the .dat file is saved and the name of the file.
*The lines to update are, "using Z:\MyData\flatfilename.dat",
*"save Z:\MyData\varlabels.dta, replace", "use Z:\MyData\varlabels.dta",
*and "save Z:\MyData\valuelabels.dta, replace".
*** Read data elements from the ASCII file ***
infix str PUF_CASE_ID 1- 37 ///
str PUF_FACILITY_ID 38- 47 ///
byte FACILITY_TYPE_CD 48- 48 /// This goes on for a number of rows and ends with
using Z:\MyData\flatfilename.dat
I have replaced the file name above in the "Z:\MyData\flatfilename.dat" and pasted into stata with the real file name "using Z:\MyData\flatfilename.dat"
In red, stata lists:
command using is unrecognized
Anyone have any help to offer?
Thanks
Instructions in do-file that came with .dat file say:
* This program will import the flat PUF text file and assign value and variable labels
*To read in the .dat file and assign variable names and labels in STATA,
*update the syntax in the four places listed in the instructions with the
*location of where the .dat file is saved and the name of the file.
*The lines to update are, "using Z:\MyData\flatfilename.dat",
*"save Z:\MyData\varlabels.dta, replace", "use Z:\MyData\varlabels.dta",
*and "save Z:\MyData\valuelabels.dta, replace".
*** Read data elements from the ASCII file ***
infix str PUF_CASE_ID 1- 37 ///
str PUF_FACILITY_ID 38- 47 ///
byte FACILITY_TYPE_CD 48- 48 /// This goes on for a number of rows and ends with
using Z:\MyData\flatfilename.dat
I have replaced the file name above in the "Z:\MyData\flatfilename.dat" and pasted into stata with the real file name "using Z:\MyData\flatfilename.dat"
In red, stata lists:
command using is unrecognized
Anyone have any help to offer?
Thanks