BookmarkSubscribeRSS Feed
ashish9541
Calcite | Level 5

Unable to open data table 

The table "_TEMP5.eu_occ" cannot be opened because it does not contain any columns.

3 REPLIES 3
ballardw
Super User

@ashish9541 wrote:

Unable to open data table 

The table "_TEMP5.eu_occ" cannot be opened because it does not contain any columns.


How did the data set get created? Check the log when running code to see what happens. A data set created without any records or variables will say so in the log.

 

Example:

250  data work.junk;
251  run;

NOTE: The data set WORK.JUNK has 1 observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.00 seconds

 

And how are you attempting to open the data set?

ashish9541
Calcite | Level 5
I have tried using PROC as well as manually. This table comes with the learning data exercise, so not sure how data set created under data folder
ballardw
Super User

@ashish9541 wrote:
I have tried using PROC as well as manually. This table comes with the learning data exercise, so not sure how data set created under data folder

I suggest that you go back through any set up instructions, redo and check each step carefully as it appears the intended set may have been corrupted and you need to recreate the original data set.

 

Note: This sort of thing can be caused by your code while learning if you place the wrong data set name on any statement that creates output. Check the log frequently. As a new user that means for each proc or data step as it runs to see if you have output issues, such as the 0 observations.

 

If  you write, or the training shows any code such as:

data somedatasetname;
    set somedatasetname;
/* other code goes here*/
run;

then that data step will completely overwrite an existing data set. So be very careful to not use the same name on the SET and DATA statements while learning.

 

Also a missing SET statement is a likely cause of 0 observations as shown in my previous post. It is very good practice to always explicitly list the data set used for source data, either with a SET statement in a data step or the DATA= option of almost every procedure.

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 3 replies
  • 857 views
  • 0 likes
  • 2 in conversation