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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 31635 views
  • 1 like
  • 2 in conversation