06-03-2015 01:52 AM
I recently took up the course 'Introduction to Statistical Analysis' and I am trying to set up 'Statadata' and library in the mentioned files but when I try to access run code for test scores I am getting an error 'statdata not found'.
I am running the following code:
libname statdata "myfolders/ESCTAT0";
libname library "myfolders/ESCTAT0";
I also tried:
libname statdata "folders/myfolders/ESCTAT0";
libname library "folders/myfolders/ESCTAT0";
I strictly sticking to the information given while taking the classes.
Kindly help me out.
06-03-2015 09:22 PM
Yes. I have tried that too. The code did get executed without any errors but when I checked the folder ESCTAT0 there was nothing created there.
06-03-2015 10:18 PM
I did try that. The code I ran was
libname statdata "/folders/myfolders/ESCTAT0";
libname library "/folders/myfolders/ESCTAT0";
This code was executed successfully without any errors.
After this assuming that the libraries are installed I tried running the following code:
proc print data= statdata.testscores (obs=10)
title 'Test Scores'
But for this code I get the following error.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
58 proc print data= statdata.testscores (obs=10)
59 title 'Test Scores'
ERROR 22-322: Syntax error, expecting one of the following: ;, BLANKLINE, CONTENTS, DATA, DOUBLE, GRANDTOTAL_LABEL, GRANDTOT_LABEL,
GRAND_LABEL, GTOTAL_LABEL, GTOT_LABEL, HEADING, LABEL, N, NOOBS, NOSUMLABEL, OBS, ROUND, ROWS, SPLIT, STYLE,
SUMLABEL, UNIFORM, WIDTH.
ERROR 76-322: Syntax error, statement will be ignored.
63 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
Since I am totally new to SAS I am not able to diagnose the problem.
06-05-2015 10:33 AM
Did you copy and paste code or did you type code? Every SAS statement ends with a semi-colon (. your program has 3 statements: PROC, TITLE and RUN. That is 3 statements. I only see 1 semi-colon after the RUN. Generally, the code in our courses is syntactically correct. So if you copied the code from the Statistics 1 course and there were missing semi-colons in the PROC PRINT step, this is something that needs to be fixed. What chapter exercise did you cut and paste from?
06-26-2015 03:22 AM
I did tried typing the code with the semi colons required. I am still getting the libraries.
Sorry for a really late reply. I couldn't reply I was travelling in India without a source to the internet.
06-28-2015 01:15 PM
The same data setup instructions are used for almost all of our e-learning courses (except for JMP and EG). Task 1 has you issue a LIBNAME statement to point to the location where you will write the files. Task 2 has the code that you cut and paste into your Editor Window to run. If you look in your folders after Task 1, but before Task 2, you will NOT see any data files. But, if you actually perform Task 1 AND Task 2, as shown here:
Then you should see this message AFTER Task 1
(but the folder will be empty until you submit the program in Task 2. AFTER running the Task 2 program, you should see data files, as shown here:
06-26-2015 07:42 AM
Hi, Vann. You said that you tried typing the cod with the semi-colons. Can you show the log where you did that? The log above doesn't show where the semi-colons are present.