Help using Base SAS procedures

Error Message - Does not contain any columns

Reply
New Contributor
Posts: 3

Error Message - Does not contain any columns

[ Edited ]

Hello

This message has appeared:

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

How to solve?

 

Super User
Posts: 13,554

Re: Error Message - Does not contain any columns

Posted in reply to AdlerCarvalho

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.

 

New Contributor
Posts: 3

Re: Error Message - Does not contain any columns

Posted in reply to AdlerCarvalho

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         
 
Super User
Super User
Posts: 8,114

Re: Error Message - Does not contain any columns

[ Edited ]
Posted in reply to AdlerCarvalho

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.

Super User
Posts: 23,740

Re: Error Message - Does not contain any columns

Posted in reply to AdlerCarvalho

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. 

 

Frequent Contributor
Posts: 116

Re: Error Message - Does not contain any columns

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.

 

New Contributor
Posts: 3

Re: Error Message - Does not contain any columns

Posted in reply to ShiroAmada

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

Ask a Question
Discussion stats
  • 6 replies
  • 841 views
  • 2 likes
  • 5 in conversation