Help using Base SAS procedures

PROC EXPORT to Stata: all variables converted to lowercase - problem

Reply
Contributor
Posts: 65

PROC EXPORT to Stata: all variables converted to lowercase - problem

Dear all,

This should be a simple question. All datasets i export from SAS to Stata using code below end up with all variables low case although they were a mix of low and upper case in SAS.

PROC EXPORT DATA=lib.foo /* exporting for panel regression in stata for panel regression */

            FILE="t:\my docs\lib.foo.dta"

            DBMS=STATA REPLACE;

RUN;

Using R 2.13, same dataset and the code below,

write.dta(lib.foo, file=paste(df.project.path,"/","lib.foo.dta", sep=""))

conserves the casing of the variables. Have been searching around for the cause, but no luck. Would appreciate any help!

Thanks,

Arsenio

Contributor
Posts: 65

PROC EXPORT to Stata: all variables converted to lowercase - problem

Posted in reply to Arsenio_Staer

Still haven't been able to figure it out. It's a rather strange coercion given that both SAS and Stata support mixed case var naming.

Any advice?

Super Contributor
Posts: 1,636

Re: PROC EXPORT to Stata: all variables converted to lowercase - problem

Posted in reply to Arsenio_Staer

you may find something information from the bottom part of the link https://communities.sas.com/message/119093#119093.  there are options (such as VALIDVARNAME) to control cases.

Ask a Question
Discussion stats
  • 2 replies
  • 2415 views
  • 0 likes
  • 2 in conversation