Page 1 of 1

Export data from CSpro 7 to STATA

Posted: July 30th, 2018, 4:44 am
by Andilip
Hello,
I'm trying to export CSpro data to STATA. I want to create separate do files for all the records (these are all rosters).

During exporting data, when I select ID items and 1 record in the dialogue box 'CSpro Export Data' (multiple files-As separate records- join single with multiple records), exporting creates .dct, .do and .dat files, which is fine.

But, whenever I select more than 1 record, it creates only .dat file for each record. .do and .dct files are not created. Without do files, I'm unable to work with the data in STATA. Any suggestions on how to solve this problem? Now I have to export each record separately to get the .do and .dct files which is time-consuming.

Re: Export data from CSpro 7 to STATA

Posted: July 30th, 2018, 7:16 am
by josh
Export data should create a separate .dct and .do file for each record that is exported. The files will have the same name as the record so if your dictionary has two records POPULATION and MIGRATION you will get POPULATION.dct, POPULATION.do, MIGRATION.dct and MIGRATION.do. Please verify that these files are not getting created. You may want to enable showing file extensions in Windows to be able to see the different files more easily (https://www.howtohaven.com/system/show- ... orer.shtml).

If the files are not being created when you export your data please send us the export specification file, CSPro dictionary and an example data file so we can reproduce the problem. You can either post it here or send it cspro@lists.census.gov.

Re: Export data from CSpro 7 to STATA

Posted: July 31st, 2018, 2:07 am
by Andilip
I've enabled showing file extensions in Windows and it is clear that the files are not being created. I've sent the files in the email address.

Thanks.

Re: Export data from CSpro 7 to STATA

Posted: January 14th, 2019, 3:06 pm
by lee
I have also been facing this problem too. Unable to create .dct and .do files. Is there a work around for this? I'm able to export to SPSS, R, Excel, etc. But when I use Stata I face several issues. Sometimes I get an "internal error" message.

Re: Export data from CSpro 7 to STATA

Posted: January 14th, 2019, 5:51 pm
by aaronw
@lee Can you send us the export specification file, CSPro dictionary, and an example data file to cspro@lists.census.gov. We'll need these files to reproduce your issue.