You could do it while building your Data or in Proc Report. Let us see how. Compute block inside Proc Report is meant for moulding your data as per your requirement.

So here is Sample code:-

ods pdf file=”/home/lochanrajeev20130/demo1.pdf” ;
proc report data=newbaseball;
column obs League Name nAtBat (Salary Position ) ;

define League/ group ‘League’;
define Name/’Name’;
define nAtBat/ ‘nAtBat’ ;
define Salary/’Salary’ ;
define Position/’Position’ ;
define obs / ‘SL No’ computed ;

compute obs ;
count+1 ;
obs=count;
endcomp;

run;
ods pdf close;