DATA Step, Macro, Functions and more

proc import fails

Reply
New Contributor
Posts: 4

proc import fails

[ Edited ]

PROC IMPORT DATAFILE="</folders/myfolders/sasuser.v94/products.xlsx.xlsx>"
OUT=WORK.products
DBMS=XLSX
REPLACE;
RUN;

/** Print the results. **/

PROC PRINT DATA=WORK.products; RUN;

                                               

          And run the program then display log window in

72 PROC PRINT DATA=WORK.products; RUN;
ERROR: File WORK.PRODUCTS.DATA does not exist.
pllllllllllllllllllllllllllllllllllz tell me the solution

 

Super User
Posts: 10,623

Re: proc import fails

[ Edited ]
Posted in reply to muledivyaswapna

Use more descriptive subjects in the future. Using "sas" in the SAS communities is not descriptive at all.

 

The failure of the proc print means that the proc import can't have worked. Please post the complete log, following the advice in https://communities.sas.com/t5/help/faqpage/faq-category-id/posting?nobounce for posting code/logs.

 

I guess that

products.xlsx.xlsx

should have been

products.xlsx
---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Super User
Posts: 9,866

Re: proc import fails

Posted in reply to muledivyaswapna

Well, the error is telling you that there is no dataset in work called products.  This is likely because the proc import step has failed for some reason.  It is a good idea to post the full log around the item in question, you will likely see error messages after proc import as well.  Also please avoid coding ALL IN CAPITALS as it really makes it hard to read.

Occasional Contributor
Posts: 14

Re: proc import fails

Posted in reply to muledivyaswapna

Please check if your file imported successfully or not..

 

or Try :- 

proc import
datafile="folders\myfolders\sasuser.v94\products.xlsx"
out=work.products
dbms=xlsx
replace;
run;

 

proc print data=products;
run;

 

Ask a Question
Discussion stats
  • 3 replies
  • 148 views
  • 0 likes
  • 4 in conversation