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

I am trying to load another excel file attached,

 

this is my code

/*Load Data*/
data Employees;
    infile "C:/Users/100355202/Desktop/employees.csv" dsd dlm = "09"x;
    input EmployeeID LastName :$20. FirstName :$20. Title :$20. Gender :$20. BirthDate :mmddyy10. 
          HireDate :mmddyy10. Address :$20. City :$20. Region :$20. PostalCode :$20. Country :$20. 
          HomePhone :$20. Extension :$20. ReportsTo;
run; 

I am getting this output

empout.PNG

I am receiving these notes

emnot.PNG

can you help me figure out what's wrong with the code

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16

Could you please try the proc import procedure as below and when you run this , you should be able to see a data step in log file.

 


proc import datafile="C:/Users/100355202/Desktop/employees.csv"  out=employees dbms=csv replace;
getnames=yes;
run;
Thanks,
Jag

View solution in original post

2 REPLIES 2
Jagadishkatam
Amethyst | Level 16

Could you please try the proc import procedure as below and when you run this , you should be able to see a data step in log file.

 


proc import datafile="C:/Users/100355202/Desktop/employees.csv"  out=employees dbms=csv replace;
getnames=yes;
run;
Thanks,
Jag
Tom
Super User Tom
Super User

You probably want , at a minimum, to add the TRUNCOVER option to your INFILE statement.  It is hard to tell what your CSV file actually looks like in this forum without downloading it.  The forum displays CSV files as if they are spreadsheets instead of the text files they are.  Perhaps if you attached to file using .txt as the extension instead. Or just pasted a couple of example lines into the pop-up box that appears when you click on the Insert Code icon.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 376 views
  • 0 likes
  • 3 in conversation