BookmarkSubscribeRSS Feed
omega1983
Calcite | Level 5

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?

8 REPLIES 8
Mit
Calcite | Level 5 Mit
Calcite | Level 5

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.

Patrick
Opal | Level 21

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;

dnuti
Calcite | Level 5

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?

LinusH
Tourmaline | Level 20

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?

Data never sleeps
dnuti
Calcite | Level 5

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.

Kurt_Bremser
Super User

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.

dnuti
Calcite | Level 5

It's a valid dataset. 

How do I get around listing each variable name?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1802 views
  • 0 likes
  • 6 in conversation