Lelia is right, the required data roles is CATEGORY.
If memory serves, waaay back in SAS 9.2, the required roles were X and Y, similar to other statements like SCATTERPLOT, etc. However, to better support the "categorizing" behavior for BARCHART, a change was made to make CATEGORY the only required role. In this case, the statement will summarize the data based frequency of category.
For backwards compatibility, an alternate was provided where one could specify both CATEGORY (or X) and RESPONSE (or Y) on the left of the '/'. Also, the CATEGORY role can be treated both as discrete or interval. Default is discrete, and each value is placed at equal interval. But if a chart is desired where the values are placed on the correct scale of a linear or date variable, then TYPE= can be specified on the axisopts option.
Or, in the equivalent SGPLOT procedure, XAXIS TYPE=TIME can be specified as shown in the example below:
https://blogs.sas.com/content/graphicallyspeaking/2015/08/12/bar-chart-on-interval-axis-sas-9-40m3/
... View more