I think that what you are looking for is either the GROUP option or the SUBGROUP option in the GCHART procedure. If I understand correctly your example, this should rather be GROUP (side-by-side bars for A and B, correct guess ?).
But you should transform your data first. Instead of :
YEAR A B
1981 12 13
1982 15 19
1983 16 20
1984 25 16
1985 23 32
you should use :
YEAR _NAME_ COL1
1981 A 12
1981 B 13
1982 A 15
1982 B 19
etc.
You can easily do so using the TRANSPOSE procedure :
PROC TRANSPOSE DATA = dataIn OUT = dataOut ;
VAR a b ;
BY year ;
RUN ;
Then apply to the new dataset :
PROC GCHART DATA = dataOut ;
VBAR year / DISCRETE GROUP = _name_ SUMVAR = col1 ;
RUN ; QUIT ;