BookmarkSubscribeRSS Feed
misoysal
Calcite | Level 5

ı have data including 5 column 16 lines  ı have also code as 

  filename aa “data-13-1.csv”;

  filename aa “data-13-1.csv”;

proc import datafile=aa  out=one  dbms=csv  replace;

run;

ods graphic off;

proc corr data=one;

  var  XO  YO;

  with X1  Y1 ;

run;

 

 

proc import datafile=aa  out=one  dbms=csv  replace;

run;

ods graphic off;

proc corr data=one;

  var  XO  YO;

  with X1  Y1 ;

run;

 

bu ı have difficulties to import data to the code page 

4 REPLIES 4
Tom
Super User Tom
Super User

Can you explain what the problem is?

You posted code, but no log of the run, so we don't know what the issue is.

You posted code that is reading from a CSV file, but you did not show any of the CSV file contents.

 

My guess just from looking at the code you posted is that the CSV file is not in the current working directory of the SAS session that is running the PROC IMPORT.  So you need to change the filename statement to give the fully qualified filename and not just a relative filename it currently has.

misoysal
Calcite | Level 5
if ı send data anad code can you do for me
due to ı am beginner ı could not transfer the data file to the snippet
below the data
[image: image.png]
and this is the code
[image: image.png]
when ı tried to have solution on SAS academic on demand
ı can not transfer the whole data to the area needed
this is my problem ı confronted
kind regards

Tom
Super User Tom
Super User

Your pictures did not make it into your message. (did you reply by email instead of using the Forum site?)

 

Is the issue UPLOADING the CSV file?  SAS/Studio has an UPLOAD feature.  Are you having trouble using that? Or is the file too big?  You can compress the CSV file using ZIP or GZIP.  A CSV file will normally compress to between 10 and 20 percent of its original size.  So perhaps that version will not exceed the file size limits.

 

Or is the issue getting the SAS code to point to where you did upload the file?  In the SAS/Studio interface you can browse to your files.  If you see the file you want to read then ask for its properties and that should show you the full path to the file that you can copy and paste into your FILENAME statement.

tom_grant
SAS Super FREQ
Additional note - you can right-click on file (CSV) & go to properties & then copy the full path to the file.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 733 views
  • 0 likes
  • 3 in conversation