BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sapkota
Calcite | Level 5

Hello All,

I need to email a SAS dataset as SAS7bdat file. The recipient of the email should be able to open it as a SAS dataset as the sas7bdat file and not as the excel or txt file.

The dataset I want to email is in the SAS System in the temporary work folder. I guess the first step is to save the SAS dataset in the desktop and then insert it in the email as sas7bdat file. However, I could not figure out how to save it first as a SAS7bdat in the desktop. I am however able to import the dataset out of the SAS system as the excel file, but I did not see any function of importing it as the SAS7bdat file.

I will appreciate any help towards this achieving this goal. Thank you.

San

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Assuming you have access/permissions you can use a libname to copy the file to your desktop though that seems like a bad idea.

Are you using SAS to email the file?

libname outdesk 'C:/users/Sapkota/desktop/';

proc datasets library=work nodetails nolist;

copy in=work out=outdesk;

select file_to_export;

run;quit;

libname outdesk;

View solution in original post

2 REPLIES 2
Reeza
Super User

Assuming you have access/permissions you can use a libname to copy the file to your desktop though that seems like a bad idea.

Are you using SAS to email the file?

libname outdesk 'C:/users/Sapkota/desktop/';

proc datasets library=work nodetails nolist;

copy in=work out=outdesk;

select file_to_export;

run;quit;

libname outdesk;

Sapkota
Calcite | Level 5

Hi Reeza,

Thank you. The SAS program you wrote worked! Much appreciate it.

No, I am not using SAS to email the file.

Sanjeeb

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1619 views
  • 0 likes
  • 2 in conversation