Help using Base SAS procedures

How to identify the SAS keywords?

Posts: 22

How to identify the SAS keywords?

Hello ~

I am learning SAS basic by reading documentation and examples. I'd like to know how to identify the SAS keywords. Please see the below example:

data groc;
input Region $9. Manager $ Department $ Sales;
Southeast Hayes Paper 250
Southeast Hayes Produce 100
Southeast Hayes Canned 120
Southeast Hayes Meat 80
...more lines of data...
Northeast Fuller Paper 200
Northeast Fuller Produce 300
Northeast Fuller Canned 420
Northeast Fuller Meat 125

proc sort data=groc;
by region department;

options nobyline nodate pageno=1
linesize=64 pagesize=20;

proc chart data=groc;
by region department;
vbar manager / type=sum sumvar=sales;
title1 'This chart shows #byval2 sales';
title2 'in the #byval(region)..';
options byline;

Could someone please help me to understand the meaning of the followings and point out what are the SAS keywords that are used. Where can I read more about SAS keywords or SAS options? Thank you VERY much for your help. I appreciate your value time.

1. vbar manager / type=sum sumvar=sales;
2. #byval2
3. #byval(region)..';
4. nobyline
5. options byline;
6. options nobyline nodate pageno=1
Super User
Posts: 5,884

Re: How to identify the SAS keywords?

For general SAS documentation (including keywords, syntax etc) see on-line doc:

For PROC GCHART specifics, see

Data never sleeps
Trusted Advisor
Posts: 2,125

Re: How to identify the SAS keywords?


One of the challenges for a learner is that SAS keywords are context sensitive. Because of that context sensitivity, I think, I've never seen a general keyword list. This allows for flexible programming, but can also lead to confusing code, particularly for a newbie. For instance,


is a legitimate SAS statement with one keyword and one (compound) argument. But please don't write code like that, it can be really hard to untangle when there is a problem.

One of the better ways to find out about keywords in SAS is to go to and enter "keyword YourSpecificKeyword" into the search box. It doesn't always work, but it has a lot more "hits" than "misses."
Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation