BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tomermahlin
Fluorite | Level 6

What are suggested toolkits / libraries for reading SAS format files (https://v8doc.sas.com/sashtml/win/z1iles.htm) ?

I would be very much interested in getting preferable tools implemented in C++ / Java.

Preference is for open source tools.

Do you know how well they perform when data (text) in SAS format file includes Hebrew characters ?

 

Many thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

They are SAS files, not format files or such which is a different story. 

 

You can try the SAS Universal Viewer - download from SAS to read the file and then perhaps export as CSV or such. 

Or you can try STAT/Transfer which is a relatively cheap third party tool to read SAS files.

 

 

View solution in original post

6 REPLIES 6
ballardw
Super User

It might help to describe what you want to do with the format files.

Generally everything you might want to know would likely best come from Proc Format unless you do not use SAS at all.

 

Proc Format with the page option will create a document of values involved or use CNTLOUT to create a SAS dataset.

 

Appearance of results could depend on the LOCALE setting of the SAS system for language support.

tomermahlin
Fluorite | Level 6

I attach a file as an example of SAS format file which is not properly read by 3rd party library. 

Hebrew data / text seems to be encoded with ISO 8859-8 code page in this file. 

 

SPSS Modeler leveraging this 3rd party library is not capable of properly processing Hebrew data (as a result of faulty SAS reading engine in this 3rd party library). 

 

Obviously one of the solutions would be to seek resolution of proper support for Hebrew in 3rd party library. However, usually embarking on this journey may be very time consuming and not necessarily productive.

 

Thus I was wondering if there is any preferable / recommend toolkit / library for reading SAS files. By a way of example:

Reeza
Super User

V8 files are almost 20 years old. Getting them to work may be problematic...is this reflective of your actual situation?

 

Third party library are maintained by the developer so you should reach out to the developer. SAS file formats are proprietary and as far as I know they do not provide tools to read them for other applications. 

 

R has the SAS7BDAT packages that reads SAS files, but not sure it has anything to read a format file, which is actually a catalog (I think).

 

tomermahlin
Fluorite | Level 6

Yes.  This is reflective of actual situation. Customer are trying to work with files (similar to what I attached) using SPSS Modeler. 

Reeza
Super User

They are SAS files, not format files or such which is a different story. 

 

You can try the SAS Universal Viewer - download from SAS to read the file and then perhaps export as CSV or such. 

Or you can try STAT/Transfer which is a relatively cheap third party tool to read SAS files.

 

 

tomermahlin
Fluorite | Level 6

STAT/Transfer tool (library DLL) from https://stattransfer.com/downloads/ is exactly what is being used by SPSS Modeler :-)). 

This tool has issues with Hebrew code page. 

 

I tried SAS Universal Viewer (from https://support.sas.com/downloads/package.htm?pid=1989#) and got very good results (see attached image illustrating how file looks like in SAS Universal Viewer vs. SPSS Modeler). 

 

PS. When I mentioned a word "format" I referred  to internal structure of SAS binary files.

It is described here: https://cran.r-project.org/web/packages/sas7bdat/vignettes/sas7bdat.pdf

I realize that there might be several different formats used by SAS Inc.

For the sake of this specific discussion sas7bdat format seems to be most relevant. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1295 views
  • 2 likes
  • 3 in conversation