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

Hello All,

I was trying to see the climate data (temperature) trend over time for combined sites. I have load the data using the command and it was successful.   However, when I tried to model it with the command than an error occurred. It said ERROR: File WORK.YEAR.DATA does not exist. Can you please help me to solve the problem? Thanks.

/** Import an XLSX file.  **/
PROC IMPORT DATAFILE="/folders/myfolders/analysisi/temp.xlsx"
		    OUT=WORK.cc
		    DBMS=XLSX
		    REPLACE;
RUN;
/** Print the results. **/
PROC PRINT DATA=WORK.cc; RUN;



proc mixed data=year;
   temp plot;
   model year =  temp plot temp*plot;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

In the proc import code you create a dataset in the library WORK, called CC.  You then print the dataset WORK.CC.  You then attempt to run a proc mixed on a dataset WORK.YEAR.  At no point in the code you have given is a dataset WORK.YEAR created, mayeb you meant to put WORK.CC in there.

 

View solution in original post

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

In the proc import code you create a dataset in the library WORK, called CC.  You then print the dataset WORK.CC.  You then attempt to run a proc mixed on a dataset WORK.YEAR.  At no point in the code you have given is a dataset WORK.YEAR created, mayeb you meant to put WORK.CC in there.

 

sohelsayma
Obsidian | Level 7

Thanks for your reply. In that case, the code looks like proc mixed data= WORK.cc;
temp plot;
model year = temp plot temp*plot;
run;

Actually WORK.cc is the spreedsheet name. Than what would be my proper code for proc mixed. Here year is the dependent variable. Can you please help to write the proper code. Sorry for asking so many questions. I am very new in SAS. Thanks

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Not sure I follow, the spreadsheet is called 

"/folders/myfolders/analysisi/temp.xlsx" 

 From that you create a SAS dataset in WORK called CC with the line:

 OUT=WORK.cc

So your correction to the proc should work:

proc mixed data= WORK.cc;
  temp plot;
  model year = temp plot temp*plot;
run;

 

However, as you are importing from Excel using a guessing procedure, it is left up to SAS to decide what to call the columns  and what lengths on the CC dataset created.  These may come from the column headings in your Excel file, they may be different.  You need to look at the attributes of the dataset CC -> you can right click on the dataset in SAS explorer and select properties.  Ensure you have a variable called year.  As for the model itself, thats really up for you to decide if its the right model for your purpose.

sohelsayma
Obsidian | Level 7
Thanks

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 30964 views
  • 1 like
  • 2 in conversation