DATA Step, Macro, Functions and more

Saving dataset after modifying

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Saving dataset after modifying

Hello everyone,

I'm using sas 9.4 and I'm trying to save existing dataset after modifying it for future processing.

Now i can see only the results of the modified dataset, but I don't know how to specify location to the out file.

 

 

libname A 'fileLocation';
data a; 
set A.fileName;
if z=. then z=0;
output;

 

Thanks,

Matan.

 


Accepted Solutions
Solution
‎10-23-2017 03:28 AM
Trusted Advisor
Posts: 1,932

Re: Saving dataset after modifying

You want to use a two-level data set name, where the first level is the library name (LIBNAME) and the second level is the actual data set name.

 

For example,

 

data a.newdata;

Also, don't forget the run; command at the end of your data step.

View solution in original post


All Replies
Solution
‎10-23-2017 03:28 AM
Trusted Advisor
Posts: 1,932

Re: Saving dataset after modifying

You want to use a two-level data set name, where the first level is the library name (LIBNAME) and the second level is the actual data set name.

 

For example,

 

data a.newdata;

Also, don't forget the run; command at the end of your data step.

Occasional Contributor
Posts: 9

Re: Saving dataset after modifying

Posted in reply to PaigeMiller
Thank you very much.
I didn't think it was that simple.

Matan.
☑ This topic is solved.

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

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