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

Hi , I am using SAS Studio, have already uploaded csv file which are my data files.How do I convert the csv file to data file.I do not find the data import wizard in the SAS on Demand for Academics.

Thank you and Best regards,

Sudipta

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Editor's note:  Thanks for the additional explanation provided by @Cynthia_sas.

 

You could try PROC IMPORT:

 

PROC IMPORT OUT = my_csv

          FILE = "c:\my_csv.csv"

          DBMS = CSV

          REPLACE;

RUN;

View solution in original post

8 REPLIES 8
SASKiwi
PROC Star

Editor's note:  Thanks for the additional explanation provided by @Cynthia_sas.

 

You could try PROC IMPORT:

 

PROC IMPORT OUT = my_csv

          FILE = "c:\my_csv.csv"

          DBMS = CSV

          REPLACE;

RUN;

Cynthia_sas
SAS Super FREQ

HI: Basically, PROC IMPORT is the correct approach. However, remember that SAS Studio does not read a C: drive location if you are using SAS Studio with the University Edition or with SAS OnDemand for Academics. For the SAS University Edition, you will need to put the CSV file in your shared folder location and your FILE= option will be something like: FILE='/folders/myfolders/my_csv.csv'. But for SAS OnDemand for Academics, when you signed up for the account, you were given a directory path, so in this instance, you would need to upload the file to your space on the server and then your FILE= option would be something like: FILE='~/xxxxxxxxx/my_csv.csv';  (where ~/xxxxxxxxxx/ is the location you find in your OnDemand control center for your directory path).

cynthia

Asudipta
Calcite | Level 5

Thank you both, I tired out the same procedure.Got the following output.

I wanted the name of the variables to be left blank.Here it is taking the first value as variable names.

sas-table2.png

SASKiwi
PROC Star

Try adding this statement to your program before the RUN statement:

GETNAMES = NO;

Asudipta
Calcite | Level 5

Thank you both, my problem got resolved. If I need to insert names to the variable, how do I go about it?

SASKiwi
PROC Star

Check out the RENAME statement in the documentation.

Asudipta
Calcite | Level 5

Thank you very much! Appreciate your support!

Shivi82
Quartz | Level 8

Hi Cynthia,

 

How can i recall my directory  path as i am also facing error while uploading the csv file.

I have enrolled to 3 courses however dont find themm listed on my login screen.

 

Regards, Shivi

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 8 replies
  • 13032 views
  • 4 likes
  • 4 in conversation