How do I fix a PROC EXPORT to CSV ERROR

Reply
New Contributor
Posts: 2

How do I fix a PROC EXPORT to CSV ERROR

Good Afternoon,

 

I have a dataset that I am trying to export to a .csv file.  I am using SAS 9. See below

 

PROC EXPORT DATA=ASJ2;

OUTFILE='c:\Users\jmitchel\Documents\ASJ2_Test.csv';

DBMS=CSV

RUN;

 

I get the following error.

 

ERROR: FILE= OR TABLE=  is required and must be specified. 

 

What is causing this error?

 

 

Super User
Super User
Posts: 7,738

Re: How do I fix a PROC EXPORT to CSV ERROR

[ Edited ]

You have and extra semi-colon. It is ending the PROC statement too soon.

I find that it really helps when you have a multi-line statement to place the ending semi-colon on a new line. Like you would do with an END statement.

 

PROC EXPORT
  DATA=ASJ2
  OUTFILE='c:\Users\jmitchel\Documents\ASJ2_Test.csv'
  DBMS=CSV
;
RUN;
New Contributor
Posts: 2

Re: How do I fix a PROC EXPORT to CSV ERROR

Thank You!

Ask a Question
Discussion stats
  • 2 replies
  • 72 views
  • 0 likes
  • 2 in conversation