BookmarkSubscribeRSS Feed
AdlerCarvalho
Fluorite | Level 6

Hello

This message has appeared:

"The table" WORK.CONSUMODENDE "can not be opened because it does not contain any columns."

How to solve?

 

6 REPLIES 6
ballardw
Super User

What kind of solution do you expect? There is nothing there. Likely there was an error when the data set was made.

You might check the log after the step that creates the data is run for any errors.

 

AdlerCarvalho
Fluorite | Level 6

Hello

So, I need to perform the proc mixed test, using data imported from excel. The data table is correct, but when performing the analysis in sas, the mentioned error appears.

The log is described below....

 

 
 
 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         
 63         PROC IMPORT DATAFILE="/folders/myshortcuts/pasta_sas_university/CONSUMODENDE.XLSX"
 64             OUT=WORK.MYEXCEL
 65             DBMS=XLSX
 66             REPLACE;
 NOTE: The previous statement has been deleted.
 67             GETNAMES=YES
 68         RUN;
            ___
            22
            202
 ERROR 22-322: Expecting ;.  
 
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 
 69         
 70         /** Print the results. **/
 71         
 
 NOTE: The import data set has 128 observations and 14 variables.
 NOTE: WORK.MYEXCEL data set was successfully created.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.04 seconds
       cpu time            0.04 seconds
       
 72         PROC PRINT DATA=WORK.MYEXCEL; RUn;
 
 
 NOTE: There were 128 observations read from the data set WORK.MYEXCEL.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.62 seconds
       cpu time            0.63 seconds
       
 
 73         
 NOTE: PROCEDURE MIXED used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 ERROR: Variable MOg in list does not match type prescribed for this list.
 NOTE: The SAS System stopped processing this step because of errors.
 74         PROC MIXED DATA=WORK.MYEXCEL;
 75         CLASS Per Trat Anim;
 76         MODEL MOg = trat;
 77         RUN;
 78         
 79         
 80         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 93         
 
Tom
Super User Tom
Super User

You told PROC MIXED that MOG was a numeric variable, but in your XLSX file it is a character string.

Either fix your XLSX file and re-import the data.

Or better still take the data out of Excel and paste it as text into your program or an external text file.  Then you can write a data step to read the data. If you use PROC IMPORT it will have to guess what variables you have and whether they are numeric or character.

Reeza
Super User

@AdlerCarvalho wrote:

The data table is correct, but when performing the analysis in sas, the mentioned error appears.

The log is described below....

 

 
 
 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         
 63         PROC IMPORT DATAFILE="/folders/myshortcuts/pasta_sas_university/CONSUMODENDE.XLSX"
 64             OUT=WORK.MYEXCEL
 65             DBMS=XLSX
 66             REPLACE;
 NOTE: The previous statement has been deleted.
 67             GETNAMES=YES
 68         RUN;
            ___
            22
            202
 ERROR 22-322: Expecting ;.  
 
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 
 

Note the word ERROR in your log, which is likely RED as well. 

It means that the import didn't work, so fix the error first. You currently have no data to work with because the import didn't work. 

 

ShiroAmada
Lapis Lazuli | Level 10

Bro just a friendly reminder.  Make it a habit to check the log (for errors) from top to bottom.  The first error may be the reason why the succeeding steps failed.  Fix the first error (that you have encountered) then rerun your code.  Then repeat until you have not seen any error in the log.  

 

Also, an error-free log does not mean you got the output data correctly.

 

AdlerCarvalho
Fluorite | Level 6

Thanks guys, I'm going to work on the show.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6 replies
  • 10711 views
  • 3 likes
  • 5 in conversation