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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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