BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GianlucaS
Calcite | Level 5

I have a problem with a sample program as below:

 

title "Stock Inventory by Type";
data WORK.IMPORT1;
proc freq data=WORK.IMPORT1;
tables Sector / nocum;
run;
title;

 

IMPORT1 is a table imported with the "import" function, but when I lunch the program the system output:

 

"Impossible open the table "WORK.IMPORT1" because it doesn't contain columns.

 

If I go to the table I can see the data (6000 rows) but if I go to the "properties" - columns there are not columns displayed. Where is the problem (I'm novice with SAS, I'm using University Edition on Amazon AWS)? I understand is a problem in the importing procedure...

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Shmuel
Garnet | Level 18

Any data step ends either by RUN; or by a new data step or by PROC...;

 

your code:

title "Stock Inventory by Type";
data WORK.IMPORT1;      /* <<<< this line destroys your import and creates a table with no columns ! */
proc freq data=WORK.IMPORT1;
tables Sector / nocum;
run;
title;

 

View solution in original post

4 REPLIES 4
Kurt_Bremser
Super User

What do you mean by "go to the table"?

 

Run a

proc contents data=work.import1;
run;

and look at the output.

And run the import again and post the log (use the {i} icon to preserve formatting).

Reeza
Super User

When you ran your import what was in the log 

Shmuel
Garnet | Level 18

Any data step ends either by RUN; or by a new data step or by PROC...;

 

your code:

title "Stock Inventory by Type";
data WORK.IMPORT1;      /* <<<< this line destroys your import and creates a table with no columns ! */
proc freq data=WORK.IMPORT1;
tables Sector / nocum;
run;
title;

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 1377 views
  • 2 likes
  • 4 in conversation