Hello,
I am new to SAS as a primarily R user until now. I am working on some basic examples in SAS to get going and the following is my code:
TITLE 'Bar Chart with Discrete Option';
PROC GCHART DATA=auto;
VBAR rep78/ DISCRETE;
RUN;
The result is ERROR: Procedure GCHART not found. Why is this happening?
I do not have the University Edition! I already checked my SAS installation, results here:
Product expiration dates:
---Base SAS Software
14APR2017
---SAS/STAT
14APR2017
---SAS/GRAPH
14APR2017
---SAS/ETS
14APR2017
---SAS/FSP
14APR2017
---SAS/ASSIST
14APR2017
---SAS/CONNECT
14APR2017
---SAS/EIS
14APR2017
---SAS Enterprise Miner
14APR2017
---MDDB Server common products
14APR2017
---SAS Enterprise Guide
14APR2017
---SAS/ACCESS Interface to PC Files
14APR2017
---SAS/ACCESS Interface to ODBC
14APR2017
---SAS Enterprise Miner for Desktop
14APR2017
---SAS Workspace Server for Local Access
14APR2017
---SAS Add-in for Microsoft Excel
14APR2017
Thanks for your help.
Yes, run:
proc product_status;
run;
Also, post your error from the log to here, with the full set of code run.
For a certain module to work in SAS, you must have it installed and licensed; since SAS/GRAPH is licensed, I suspect that your installation was not complete. This might be due to the deployment plan that was used.
Did you do the SAS installation yourself?
Nope, IT did the install, is there a way I can check the install ?
Yes, run:
proc product_status;
run;
Also, post your error from the log to here, with the full set of code run.
For an even more comprehensive report, run the SAS Install Reporter program that you can find with this SAS note (Downloads tab)
Oh, and one more tip -- if you are just getting started with SAS, I recommend learning PROC SGPLOT instead of GCHART for basic analytical graphs. Coming from R, you'll find the syntax a little bit cleaner and less verbose. SGPLOT is part of Base, not SAS/GRAPH.
@Jay54 wrote a nice intro to VBAR in this blog post. You might also want to check out the SAS Programming for R Users course (free materials here!).
You will want to use the SAS/GRAPH techniques to do more advanced tricks with drilldowns and geo maps, if you have those requirements.
Thank you for the suggestion to use SGPLOT in the University edition. This helped me solve a problem I was having on my first SAS assignment. Here is a code snippet to display the syntax difference between SGPLOT and GCHART for a bar graph displaying population percentages:
/** Does not work with the University Edition
proc gchart data=A;
vbar 'Place of Birth'n / freq=number
type=percent raxis=axis1 width=9 space=3;
**/
proc sgplot data=A;
vbar 'Place of Birth'n / freq=number barwidth=.9 stat=percent ;
This is what I got when I typed in your suggestion, I'm using SAS University Edition. I am trying to create a 'simple graph' with data I have.
This is what I ran to receive the error (I Imagine this is leading cause in error):
proc sgplot data=/folder/myfolders
run;
Hi:
there's something else wrong with your code.
Try this:
proc sgplot data=sashelp.class;
vbar sex / response=height stat=mean;
run;
And you should get a vertical bar chart. Typically, you need the full name of a SAS dataset after data= in the PROC step.
You have only partial code. I would expect you to get an error on
proc sgplot data=/folders/myfolders;
run;
for 2 reasons:
1) you are only pointing to a folder, not to a dataset in the folder
2) you do not have an action or plot statement, like vbar, hbar, scatter or series, etc.
I would expect my code to work for you in SAS University Edition.
Cynthia
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 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.
Ready to level-up your skills? Choose your own adventure.