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

Please provide a simple example of how I can make a work.import file into a sas7bdat file. In other words I have a dataset in my work library with the default name import. I want to save it as import.sas7bdat.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Personally I prefer to "import" directly into the library:

 

libname mylib "<some path>";

proc import datafile="<path>filename.ext" 
       out=mylib.mydatasetname
   <other Import options>
run;

If you are using widgets to run the import then if you have the LIBRARY assigned before using the widget you should be able to indicate that library as the destination for the imported data.

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

This is probably the simplest way:

data '\Myfolder\import';
  set work.import;
run;

But using a LIBNAME is better:

libname MyLib '\Myfolder';

data MyLib.import;
  set work.import;
run;

 

ballardw
Super User

Personally I prefer to "import" directly into the library:

 

libname mylib "<some path>";

proc import datafile="<path>filename.ext" 
       out=mylib.mydatasetname
   <other Import options>
run;

If you are using widgets to run the import then if you have the LIBRARY assigned before using the widget you should be able to indicate that library as the destination for the imported data.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 998 views
  • 2 likes
  • 3 in conversation