DATA Step, Macro, Functions and more

Export XPT sas7bdat in linux using perl

Accepted Solution Solved
Reply
User
Posts: 1
Accepted Solution

Export XPT sas7bdat in linux using perl

Hi All,

 

           I am new to perl. Normally, we export xls and pdf format from database. but one of client asks to export as xpt and sas xpt format. Please give some steps which software I install and installation steps. I cant view xpt and sas file normally. Its very very urgent to complete this task.  Anybody give idea on this?

 

 

Thanks,

S.Sujatha

 

 


Accepted Solutions
Solution
‎10-09-2015 08:28 PM
Super User
Posts: 5,426

Re: Export XPT sas7bdat in linux using perl

I guess that your user refers to the libname export engine:

http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/p052e5a7x9rhl8n1y1y7e82jfe0z.ht...

 

But I find export files created by PROC CPORT more useful, they keep more of data sets attributesn in the export file.

Data never sleeps

View solution in original post


All Replies
Solution
‎10-09-2015 08:28 PM
Super User
Posts: 5,426

Re: Export XPT sas7bdat in linux using perl

I guess that your user refers to the libname export engine:

http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/p052e5a7x9rhl8n1y1y7e82jfe0z.ht...

 

But I find export files created by PROC CPORT more useful, they keep more of data sets attributesn in the export file.

Data never sleeps
Super User
Posts: 5,426

Re: Export XPT sas7bdat in linux using perl

For software, you need to install Base SAS. If you wish to export data directly from the source database you might need a SAS/ACCESS module.

To avoid that, you could first export your data to an external file, import it to SAS, and then do the transport file. But as you hear, this is awkward.

So, what is the use case, why can't your user access the data directly from the database? Using ODBC or similar.

Data never sleeps
Trusted Advisor
Posts: 2,115

Re: Export XPT sas7bdat in linux using perl

This document contains the record layout for a SAS .xpt file

 

https://support.sas.com/techsup/technote/ts140.pdf

 

You do not need to have SAS installed to create a .xpt file.

Super User
Super User
Posts: 7,942

Re: Export XPT sas7bdat in linux using perl

Why do you have a need to do this?  I find most in my industry at least are moving rapidly away from XPT (considering its a pretty old format now (version 6!).  To my mind you would be better off putting your effort into XML output as that is the immediate future, and its open source.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 268 views
  • 0 likes
  • 4 in conversation