Help using Base SAS procedures

how do i export to a sas7dat file

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 84
Accepted Solution

how do i export to a sas7dat file

I have a dataset I save as

PROC export

outfile="\\abccsrv1\dept\IM\Information and Service Requests\irsas14$dir\IR14006\Vers_1\Deliverables\ir14006.xls" dbms=XLS replace

2003;


;

how would I save as a sas7dat?


Accepted Solutions
Solution
‎03-26-2014 03:51 AM
Super User
Posts: 7,854

Re: how do i export to a sas7dat file

You don't need to export it, you already have a .sas7bdat in SAS. If you want to copy it somewhere, assign a library there and use proc copy.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 19,867

Re: how do i export to a sas7dat file

You need proc import.

Frequent Contributor
Posts: 84

Re: how do  i export to a sas7dat file

do you have an example proc export seems counter intuitive since I an creating a dataset

Super User
Posts: 19,867

Re: how do  i export to a sas7dat file

In SAS go to File>Import Data and click through selection, at the end it will give you the option to save the code to a file.

Solution
‎03-26-2014 03:51 AM
Super User
Posts: 7,854

Re: how do i export to a sas7dat file

You don't need to export it, you already have a .sas7bdat in SAS. If you want to copy it somewhere, assign a library there and use proc copy.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Super User
Posts: 7,988

Re: how do i export to a sas7dat file

Posted in reply to KurtBremser

As KurtBremser has stated you should have the data somewhere, and your proc export is incomplete:

PROC export

/* Missing */  data=... /* this statement would tell you where the dataset is, if you are using the functionality of processing a previous dataset (and I would still recommend putting the data= statement in regardless for clarity - then look at that datastep */

outfile="\\abccsrv1\dept\IM\Information and Service Requests\irsas14$dir\IR14006\Vers_1\Deliverables\ir14006.xls" dbms=XLS replace

2003;


;

🔒 This topic is solved and locked.

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

Discussion stats
  • 5 replies
  • 473 views
  • 0 likes
  • 4 in conversation