BookmarkSubscribeRSS Feed
acyares
Calcite | Level 5

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

7 REPLIES 7
TheShark
Obsidian | Level 7

Have you tried,

 

proc cport
 file = 'C:\path_to_file\filename.stc'
 library = WORK
 disk
;
run ;
acyares
Calcite | Level 5

Yup, that's what I tried first. Here's what I happened: 

 
x1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
x61
x62 proc cport
x63 file = 'C:\Users\acyares\Desktop\sppa1982-2012_nw.sas7bdat\35588-0004-Data.stc'
x64 library = WORK
x65 disk
x66 ;
x67 run ;
 
xERROR: Insufficient authorization to access
x/opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\acyares\Desktop\sppa1982-2012_nw.sas7bdat\35588-0004-Data.stc.
xNOTE: The SAS System stopped processing this step because of errors.
xNOTE: PROCEDURE CPORT used (Total process time):
xreal time 0.00 seconds
xcpu time 0.00 seconds
 
x68
x69 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
82
Tom
Super User Tom
Super User

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; 
Tom
Super User Tom
Super User

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?

acyares
Calcite | Level 5

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

Reeza
Super User

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. 

ChrisHemedinger
Community Manager

@DrAnnmaria created a very helpful tutorial about this topic!

 

See:  Getting STC files into SAS Studio

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 7 replies
  • 11187 views
  • 0 likes
  • 5 in conversation