libname adhoc_vb pcfiles
path = '//gaserver/myfile.sas7bat'
server= "2233";
port = 2234;
proc import datafile = '//gaserver/myfile.sas7bat'
out = order1;
dbms =
server= "2233";
run;
I want to import ths file called myfile.sasbat. In this case what would the dbms be called or is there another way to import a file with the .sasbat file extension?
You don't need to import a sas data.
If your library is defined ok then you can open the data directly. Just check if the libname is successful.
As Mit wrote: The data is already stored as a SAS file so you need only to define a libname to access it within your SAS program, e.g:
libname mylib '' '//gaserver';
proc print data=mylib.myfile;
run;
I have a related question that isn't answered yet.
I also have a .sasbat file. I want to use proc import so that I don't have to list the near hundred variables in an input statement. Is there no way to get around this?
sasbat is not a common file suffix that I'm aware of. What file type is it?
What does it look like when opened in Notepad/vi?
It cannot be opened in anything but SAS. Otherwise it's giberish. Not an original file but I don't have access to an original file.
Rename it to .sas7bdat, put it into a location where you have assigned a libname, and see if it is a valid SAS dataset. If not, discard.
It's a valid dataset.
How do I get around listing each variable name?
You don't need to import it, just use it.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: