Page 1 of 1

Stata do file, Exported.do file variable in lower case

Posted: February 12th, 2025, 6:38 am
by msoni
Hello an dgood evening

When i exported CSPro data to Stata Statistical software, it gives three files, Exported.do, Exported.dct and Exported.dat files.
As we know that variable names are in CSPro are in UPPER case, when it export to Stata, why it automatically changes to lower case in Stata do file , exported.do.

How can i get it in UPPER case in the same Exported.do file.
Many thanks
Manoj

Re: Stata do file, Exported.do file variable in lower case

Posted: February 12th, 2025, 11:48 am
by htuser
I never export CSPro data to stata. However, if Exported.do file is human readable (as for txt or csv etc), you use CSPro file.read/fileread function, file.readlines action (https://www.csprousers.org/help/CSPro/C ... Lines.html) to read the lower case Stata do file and write it to a new UPPER case .do file.
If you post a sample of the lower case Stata do file, maybe I can help you in solving this issue.
Best