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

 Hello,

 

I am doing a research project, and ran into some SAS macros. Most are txt file which I can read, except for 1.

Could someone help convert the attached SAS transport file so I can read it in Excel.

[The original file was just "C2211L4P" (no extension). I had to add .txt so I could upload to this post.]

I tried the SAS General Viewer, which didn't read it either.

 

Here are the directions that came with the file. 

 

Code for converting coefficients transport file to SAS file:

filename inc  "C:\user defined location of the transport file\C2211L4P";

libname incoef  "C:\user defined location of the sas coefficients file";

proc cimport data=incoef.hcccoefn infile=inc;

run;

 

Thank you 

Sam

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Then look at a proc export to export your data to a CSV file and you'll need to download the results.

 

FYI CSV are text files that happen to open in Excel by default. 

View solution in original post

11 REPLIES 11
ballardw
Super User

Follow those instructions. Then export the the resulting data set(s) to csv.

 

The SAS transport files may contain multiple data sets and possibly catalogs, the instruction program is showing you how to extract only the data of interest.

sam4734
Fluorite | Level 6

Hi - 

I don't have SAS. And, just need to get this one file converted.

Or is there a tool that would convert the transport file into csv or txt for me?

Thanks

Sam

Reeza
Super User

There are versions of SAS available for your usage, assuming you're a student. Your university should also provide a copy/access if they expect you to use SAS. 

 

http://www.sas.com/en_my/learn/analytics-u.html

ballardw
Super User

You might find a third-party software that does a conversion BUT the caveat would be whether your dataset contains any features that were not available when the conversion was written.

 

I would suggest downloading SAS University Edition, which is free and then use the Proc cimport code.

sam4734
Fluorite | Level 6

can I use the cloud version or is the download/install the best way?

 

I assume there is "command" area where I can do those commands?

Or if you can point me to a How-To or menu option, otherwise I may be hunting around more.

Obviously, I have no SAS experience.

Thanks again,

Sam

 

Reeza
Super User

If you're going to use it once and only for this, I would probably sign up for the cloud version via SAS Academics on Demand. If you plan to use it in the future then download and set up. It's a big file (2GB). 

 

Basic tutorial video's are here:

http://support.sas.com/training/tutorial/

 

sam4734
Fluorite | Level 6

We'll give it a go. Thank you all

Sam

sam4734
Fluorite | Level 6

Hello,

 

Using the online version of SAS

I've been trying to run the following to convert the transport file.

I'm getting the error: ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/c:\hcc\C2211L4P.

I've double-checked. Attached is my folder. Again, I don't know SAS at all.

 

filename inc "c:\hcc\C2211L4P";
libname incoef "c:\hcc";
proc cimport data=incoef.hcccoefn infile=inc;
run;

 

Two Qs

1) what do I need to do?

2) once converted, how do I convert to Excel csv?

 

Thanks again

Sam

Reeza
Super User

You need to upload the file to the server.

When referencing files on the server, right click on it under Servers pane, select properties and find the path. The path is not your C drive since you're using an online service rather than an installation.

Reeza
Super User

Then look at a proc export to export your data to a CSV file and you'll need to download the results.

 

FYI CSV are text files that happen to open in Excel by default. 

sam4734
Fluorite | Level 6

Thanks. Was able to convert & export. All set.
Sam

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 Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 6343 views
  • 4 likes
  • 3 in conversation