Let say, A monthly transaction dataset contains customer account number and account balance.This dataset may have multiple occurrences of an account number. How should i generate a report having total balance of only unique account numbers
As Scott hinted, with PROC REPORT, you would want a SUMMARY report (where each report row represented the "collapsing" or "summarization" of all the observations for a unique GROUP variable (or combination of GROUP/ORDER variables)).
For example, with this data:
input acct amt;
There are 11 observations in the data set, but only 4 unique account numbers.
So, this PROC REPORT, will produce a "summary" report:
ods listing close;
ods html file='bankinfo.html' style=sasweb;
proc report data=bankinfo nowd;
column acct amt n;
define acct / group;
define amt / sum f=comma6. "Balance Amt";
define n / 'Number of Obs';
rbreak after / summarize;
if _break_ = ' ' then cnt_uniq + 1;
compute after /
line 'Number of Accounts:' cnt_uniq 2.0;
ods html close;
.... that has one report row for every unique value of account number. The RBREAK AFTER statement will put a "grand total" summary line at the bottom of the report. The LINE statement inside the COMPUTE block adds an explanatory line to the bottom of the report that shows what the total count of unique account numbers is. The CNT_UNIQ temporary variable is used to hold a "running" count of unique account numbers.
Sounds like you want a summary reporting. Have a look at the GROUP option on the DEFINE statement.
Have a look at the search option on the SAS support website http://support.sas.com/ or a Google advanced search using the keywords below will yield several matches with SAS DOC, technical papers (SGF, SUGI user conference).