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

Hi All, 

 

So I am still a bit new to SAS. I am using SAS University and I accidentally let me license laps, so I have SAS University redownloaded, but I am needing to re-import my data that I lost access to when my license lapsed. 

 

I have done this before, but this time around I cannot for the life of me get the data read into SAS :(. 

 

I am using the following code: 

 

data IHC.Emain;

infile '/Users/scott/Documents/Folders/MyFolders/EMainTable.csv' firstobs=2 dlm=',' lrecl=32000 truncover DSD;

length Newid Icupt Dschrg_dspstn_cd Mortly_indctr_cd Primdischdiagcd $ 8

Primdishdiag Admitdiagcd1 $ 8 Admitdiag1 Male Age Imrs Imrsgroup

Imrsgroup3 Rvitestresult Cvhx Hearrate Resprate Sbp dbp Bmi

Minapache Maxapache Hypertensionhx Hyperlipidemiahx Diabhx

Mihx Cadhx Cvahx Tobaccohx Pttype $ 8 Afibhx Dysrhythmiahx

Chfx Copdhx Respfailhx Renalfailhx Liverfailhx Tiahx

Alcoholabusehx Drugabusehx Race $ 8 Pneumonia Adeno H1ni Hmpv

Flua Flub Para Rihino Rsv Corona Bnppreclosest Bnppremax

Bnpindexhospmax Bnpost90dymax Esrindexhospax Gfrindexhospmin

Tropiindexhospmax Tropipost90dymax Sp02indexhospmin

Staphaureusindexhosp Streppneumoindexhosp Afibindexhosp

Chestpainindexhosp Chfindexhosp Cvaindexhosp Dysrhythmiaindexhosp

Fallindexhosp Liverfailindexhosp Malaiseindexhosp Miindexhosp

Respfailindexhosp Sepsisindexhosp Sobindexhosp Wheezeindexhosp

Coughindexhosp Sputum Feverindexhosp Temp Fever Wbc Dxleukocytosis

Leukosytosis Crphsindexhospmax Elevatedcrp Dxhypoxemia Hypoxemia

Anydrug Antibiotic Anticoagulant Anticoagulantother Antiplatelet

Antiviral Betablocker Ccb Corticosteriod Statin Warfarin Fvc

Fivc Tlc Frc_n2 Fef25_75 Pef Fev1 Fev2 Fev3 Fev5 Fev6 Fev75

Dlco Vc Upperrespinfection Tuberculosis Bronchiolitis

Bronchitis Bacterialpneumonia Viralpneumonia Infectiouspneumonia

Influenza Infection Anypneumtest Pntestresult $ 8 Cpneumo Npneumo

Streppneumo Anybactest Anybacpositive Anylungbactest

Lungbacpositive dead Cvdeathhosp Timetodeath Cvprimcauseofdeath

Cvaprimcod Miprimcod Mifu Timetomi Cvafu Timetocva Chfifu

timetochf 8;

input Newid Icupt Dschrg_dspstn_cd Mortly_indctr_cd Primdischdiagcd

Primdishdiag Admitdiagcd1 Admitdiag1 Male Age Imrs Imrsgroup

Imrsgroup3 Rvitestresult Cvhx Hearrate Resprate Sbp dbp Bmi

Minapache Maxapache Hypertensionhx Hyperlipidemiahx Diabhx

Mihx Cadhx Cvahx Tobaccohx Pttype Afibhx Dysrhythmiahx

Chfx Copdhx Respfailhx Renalfailhx Liverfailhx Tiahx

Alcoholabusehx Drugabusehx Race Pneumonia Adeno H1ni Hmpv

Flua Flub Para Rihino Rsv Corona Bnppreclosest Bnppremax

Bnpindexhospmax Bnpost90dymax Esrindexhospax Gfrindexhospmin

Tropiindexhospmax Tropipost90dymax Sp02indexhospmin

Staphaureusindexhosp Streppneumoindexhosp Afibindexhosp

Chestpainindexhosp Chfindexhosp Cvaindexhosp Dysrhythmiaindexhosp

Fallindexhosp Liverfailindexhosp Malaiseindexhosp Miindexhosp

Respfailindexhosp Sepsisindexhosp Sobindexhosp Wheezeindexhosp

Coughindexhosp Sputum Feverindexhosp Temp Fever Wbc Dxleukocytosis

Leukosytosis Crphsindexhospmax Elevatedcrp Dxhypoxemia Hypoxemia

Anydrug Antibiotic Anticoagulant Anticoagulantother Antiplatelet

Antiviral Betablocker Ccb Corticosteriod Statin Warfarin Fvc

Fivc Tlc Frc_n2 Fef25_75 Pef Fev1 Fev2 Fev3 Fev5 Fev6 Fev75

Dlco Vc Upperrespinfection Tuberculosis Bronchiolitis

Bronchitis Bacterialpneumonia Viralpneumonia Infectiouspneumonia

Influenza Infection Anypneumtest Pntestresult Cpneumo Npneumo

Streppneumo Anybactest Anybacpositive Anylungbactest

Lungbacpositive dead Cvdeathhosp Timetodeath Cvprimcauseofdeath

Cvaprimcod Miprimcod Mifu Timetomi Cvafu Timetocva Chfifu

timetochf;

run;

 

and I get the following error: 

 

ERROR: The path /Users/scott/Documents/MyFolders/EMainTable.csv is not in the list of accessible paths when SAS is in the lockdown state.

 

I have tried replacing "/Users/scott/Documents/MyFolders" with "/folders" but when I do that I get the following error: 

 

ERROR: Physical file does not exist, /folders/MyFolders/EMainTable.csv.

 

I checked and the folder the data file is in is the one I have shared with the virtual machine I am using, it has full access and it is set to auto-mount. 

 

I just don't know what I am doing wrong this time... any help or insight would be appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

/Users/scott/Documents/Folders/MyFolders/EMainTable.csv is the path on your Mac. Within the SAS UE virtual machine it should be represented by /folders/myfolder/EMainTable.csv, if you set up UE correctly.

View solution in original post

3 REPLIES 3
Tom
Super User Tom
Super User

Could be as simple as your use of mixed case in the directory path.

If you are using SAS/studio interface and can find the file in the explorer panel on left of the screen then select it and ask to see its properties. There you can find the path the SAS machine can uses to reference the file.  So just copy that and paste it into your program.

Kurt_Bremser
Super User

/Users/scott/Documents/Folders/MyFolders/EMainTable.csv is the path on your Mac. Within the SAS UE virtual machine it should be represented by /folders/myfolder/EMainTable.csv, if you set up UE correctly.

ScottSt
Fluorite | Level 6

That was it, I feel so silly. I had been learning to use SAS using that one data set all year, so I never read any other data set in except that one and I had forgotten that step. 

 

Thank you so much!

sas-innovate-2024.png

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.

 

Register now!

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.

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
  • 3 replies
  • 896 views
  • 0 likes
  • 3 in conversation