I'm trying to import my assignment data which is a cvs file into the sas system and am having some trouble figuring out the code. I also need to make charts and tables from this data that I bring in (pie chart, line frequency, scatter chart, area chart). Would anyone be able to assist me with the coding for this?
We're happy to help, but you need to provide more details.Show what you have, what you need AND what you've tried so far.
Here's a starter for your, a bunch of videos that cover various topics, including how to import a CSV file.
http://video.sas.com/#category/videos/how-to-tutorials
I want to produce something similar to the attachments i have provided. What would be the syntax for producing these? I can't seem to find help regarding how to code these anywhere.
PROC SGPLOT
Unless your CSV file has some non-standard features you should be able to import it using a wizard in the File>import data menu.
Or if you have written code then show the code you have tried and log results and explain what you are having problems with.
Your online help, opened with F1 key most likely, should have a section on "learning to use SAS" with a number of examples.
You may have to explain exactly what you mean by "line frequency" or "area" chart (there are a number of these). The documentation for Proc SGPLOT will have examples for most common types of charts.
This site works best for those that show what they have attempted and let us know what isn't going well for them. If there are errors the post the code and errors from the log into a code box opened with the forum {I} menu icon.
If get stuck with an option, show the code.
Every single question here could have the title you used. Next time please make the title as specific as you can.
Hello ,
Don't worry it's not that hard but you have to familiar with ODS graphs/ PROC SGPLOT /PROC TEMPLATE that may helps you a lot for it.I usually do one thing If I come across CSV file than I first convert in to XLSX file ( I am just doing because I've created MACRO for it). Use try this code :
1) CSV to excel : Open your csv file and hit on SAVE AS .. and save to YYYY.XLSX extension.
2) SAS proc import code :
Proc Import datafile=" Path / YYYY.Xlsx " DBMS= xlsx OUT= work.import
replace ;
run;
3) depending on the variables and requirements use PROC SGPLOT /PROC TEMPLATE ...
I hope this may help.
Parth Shah
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.