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!

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 2446 views
  • 0 likes
  • 3 in conversation