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:
File that I used (came with the book and is public) is attached as well.
Please advice! Thanks.
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.
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
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?
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.
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!
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.