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

I am running the code from SAS by Example book, but getting this error:

 

--code as it came with the sample SAS program (except I changed the location). File exists but still getting error.

*Data set BLOOD;
data learn.blood;
infile 'I:\Reference\SAS_Related\Books\SAS_By_Example\data\blood.txt' truncover;
length Gender $ 6 BloodType $ 2 AgeGroup $ 5;
input Subject
Gender
BloodType
AgeGroup
WBC
RBC
Chol;
label Gender = "Gender"
BloodType = "Blood Type"
AgeGroup = "Age Group"
Chol = "Cholesterol";
run;

 

Error:

 

 

ubshams_0-1586973473470.png

File that I used (came with the book and is public) is attached as well.

 

Please advice! Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

How did you store the file in a Linux folder, and what is the name of the folder?

 

Keep in mind that a UNIX is case sensitive, so you need to be correct with the spelling of your filename.

 

Please also post the log of this failed attempt.

View solution in original post

4 REPLIES 4
yabwon
Onyx | Level 15

Are you using SAS on Linux or UNIX?

If yest this may be the reason. Your system can't see the file.

 

All the best

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



ubshams
Quartz | Level 8

Yes, on Linux. I am using SAG EG.

But when I save the .txt file in the Linux folder I get the same error. Any way to fix it?

 

Kurt_Bremser
Super User

How did you store the file in a Linux folder, and what is the name of the folder?

 

Keep in mind that a UNIX is case sensitive, so you need to be correct with the spelling of your filename.

 

Please also post the log of this failed attempt.

ubshams
Quartz | Level 8
Case sensitivity fix fixed it. Thanks!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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