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
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;
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;
Hi Reeza,
Thank you. The SAS program you wrote worked! Much appreciate it.
No, I am not using SAS to email the file.
Sanjeeb
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.
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.