Help using Base SAS procedures

Converting SAS DATASETS INTO XPT files for variable name length greater then 8

Reply
Frequent Contributor
Posts: 145

Converting SAS DATASETS INTO XPT files for variable name length greater then 8


Hi,

I have to convert my sas datasets into Xpt files.

Some of the varaiblenames are greater then 8 like ABCEDFGH.

Can someone explain the way to convert those sas datasets into xpt

Thanks in advance

Super User
Posts: 5,260

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

First explain why do you want to create XPT-files?

There are other ways to migrate data between SAS hosts/versions that doesn't have the 8 char variable name restriction.

Data never sleeps
Frequent Contributor
Posts: 145

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

For FDA submission,

we need to submit the data XPT format only. Can you help if there is any way we could convert sas files to xpt files for variablename greater then 8..

Respected Advisor
Posts: 3,777

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

Are you sure that renaming a few variables is the only problem?  What about LABEL and char variable length. 

Frequent Contributor
Posts: 145

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8


It is not about renaming variable.........XPT files were not able created quoting reason as varaiblename in sas datset is more then 8 characters in length........

Super User
Posts: 5,260

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

Well, you do need to rename variables if they are longer than 8 char. The same goes for format names, label length etc. You need to make your data V6 compliant.

Data never sleeps
Respected Advisor
Posts: 3,777

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

Well in order process the existing data with the XPORT engine you are doing to need to create a data set that has the proper V6 names.  You might get it to work by renaming the existing variables but that may not be the only problem.  You should probably spend some time with the SAS documentation concerting the XPORT engine and the restrictions associated with it.

Frequent Contributor
Posts: 145

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

The problem here is not renaming the variables.....our client has given few variable names(greater then 8 charactesr length). He is very parcticular about having only  those variablenames in final xpt file....he doent want the varaibles to be renamed........any way to do this............

Respected Advisor
Posts: 3,777

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

No.

New User
Posts: 1

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

Hello,

If you had solved this, can I get code over here?

I also would like to convert my SAS data set to .XPT for FDA, please lemme know.

 

Thanks

Super User
Posts: 3,115

Re: Converting SAS DATASETS INTO XPT files for variable name length greater then 8

If you want to transport SAS datasets, containing variable names longer than 8 characters then you should check out the CPORT and CIMPORT procedures. These handle them fine.

Here is a good starting point: http://support.sas.com/documentation/cdl/en/movefile/63050/HTML/default/viewer.htm#p0p45wa0uwhgcan1e...


Ask a Question
Discussion stats
  • 10 replies
  • 2937 views
  • 1 like
  • 5 in conversation