I checked everything but have no clue. the location is 200% correct. see below copy and paste from SAS studio location.
/home/coccus030/sasuser.v94/institutiondata.txt
My code:
libname Lesson08 '/home/coccus030/sasuser.v94/institutiondata.txt';
Data Lesson08.college09ds;
Infile '/home/coccus030/sasuser.v94/institutiondata.txt.Lesson08' firstobs=2;
Input GenderType & $6. +1 Year +1 Total comma5. Asofdate Gender $ Instituion $;
run;
error log:
libname Lesson08 '/home/coccus030/sasuser.v94/institutiondata.txt';
Your libname is 200% bogus.
A libname for a Base SAS library does not point to a file, but to a directory.
Only some special engines (like Excel) point to files.
Thanks Kurt
I still not sure why not read.
Try:
FILENAME Lesson08 '/home/coccus030/sasuser.v94/institutiondata.txt.Lesson08';
LIBNAME mylib '/home/coccus030/sasuser.v94';
Data MYLIB.college09ds;
Infile Lesson08 firstobs=2;
Input GenderType & $6. +1 Year +1 Total comma5. Asofdate Gender $ Instituion $;
run;
Without having your input file I cant verify that code.
Not working neither same error message pop up with mylib.
this is the input file but I have to check this part yet because the libname and infile not work.
Variables: GenderType Year Total Asofdate
ihe-M 1970 5,044 Retrieved: 03/14/2012 f-IHE 1970 3,537 Retrieved: 03/14/2012
ihe-m 1980 5,874 Retrieved: 03/14/2012 f-IHE 1980 6,223 Retrieved: 03/14/2012
ihe-M 1990 6,284 Retrieved: 03/14/2012 F-IHE 1990 7,535 Retrieved: 03/14/2012
dgi-M 2000 6,722 Retrieved: 03/14/2012 f-dgi 2000 8,591 Retrieved: 03/14/2012
dgi-m 2001 6,961 Retrieved: 03/14/2012 f-dgi 2001 8,967 Retrieved: 03/14/2012
DGI-m 2002 7,202 Retrieved: 03/14/2012 f-dgi 2002 9,410 Retrieved: 03/14/2012
dgi-M 2003 7,260 Retrieved: 03/14/2012 F-DGI 2003 9,651 Retrieved: 03/14/2012
dgi-M 2004 7,387 Retrieved: 03/14/2012 F-DGI 2004 9,885 Retrieved: 03/14/2012
dgi-m 2005 7,456 Retrieved: 03/14/2012 f-DGI 2005 10,032 Retrieved: 03/14/2012
DGI-m 2006 7,575 Retrieved: 03/14/2012 f-dgi 2006 10,184 Retrieved: 03/14/2012
dgi-M 2007 7,816 Retrieved: 03/14/2012 f-dgi 2007 10,432 Retrieved: 03/14/2012
dgi-M 2008 8,189 Retrieved: 03/14/2012 F-DGI 2008 10,914 Retrieved: 03/14/2012
DGI-m 2009 8,770 Retrieved: 03/14/2012 F-dgi 2009 11,658 Retrieved: 03/14/2012
Saying "libname and infile not work." - is not enough.
To help you we need the full log.
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.