Hi,
I'm new to SAS studio and I'm having a problem opening an .stc file. I never had a problem opening this file until switching over to SAS studio. How do I go about importing/opening the file?
Thanks,
Ami
Have you tried,
proc cport
file = 'C:\path_to_file\filename.stc'
library = WORK
disk
;
run ;
Yup, that's what I tried first. Here's what I happened:
First PROC CPORT is used to CREATE cport files. If you want to read one you need to use PROC CIMPORT.
Second the file needs to be in a location that the SAS program can read. Your logs is clearly showing that you are trying to reference a file using Windows filename (and most likely on the personal computer) and your SAS session is running on a Unix machine.
If you are using SAS University Edition the make sure to but the file into a folder that you mapped into the virtural machine that is runnng SAS. If you are running SAS/Studio on some physical Unix machine then put the file into a folder on that machine (or a drive that is mounted on that machine.) You could try using the SAS/Studio interface to upload the file from your PC as long as it is not too large.
Once you have copied it somewhere SAS can see then run code like this to convert it into a data set. You should proabably save it as a SAS dataset to avoid having to run this step everytime you want to use it.
proc cIMport
infile = '/folders/myfolders/sppa1982-2012_nw.sas7bdat/35588-0004-Data.stc'
lib=work
;
run;
What CODE did you run the past to convert the file?
Or did you just use the SAS Display Manager to auto convert it for you?
When the file was saved to my desktop, it opened automatically into SAS 9.4 but for some reason, I can't figure out why I can't open it on SAS Studio
Because SAS Studio is likely running on a server not on your desktop. So you need to upload it first to somewhere SAS Studio can see the file and then it will import it as it did previously.
You're switching to a desktop environment to a server environment which has its pros/cons. What you're seeing is one of the learning curves.
@DrAnnmaria created a very helpful tutorial about this topic!
See: Getting STC files into SAS Studio
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.