I am very new to SAS and I'm having a problem with PROC REPORT. I have looked through "The Little SAS Book" and some online doc, but can't find an answer. I have some raw data that I'm trying to calculate. can anyone tell me how to subtract one variable from another to produce a variable that is not in the input data or is that not possible with PROC REPORT? This is a sample of my input and also of my SAS code, if that helps. I am trying to sum VOLCAPGB then subtract the variable VOLCAPGB from the grouped variable CONTRACT to produce REMAINING. I basically want the end result to look like this(below in bold), of course this example is just a portion of my data, its rather large. Any help would be greatly appreciated.
CONTRACT VOLCAPGB REMAINING
163000 160 162840
(Input Data)
CONTRACT VOLCAPGB
163000 27
163000 27
163000 27
163000 27
163000 27
163000 27
PROC REPORT DATA=MAP HEADLINE NOWD;
COLUMN CONTRACT VOLCAPGB REMAINING;
DEFINE CONTRACT / GROUP;
DEFINE VOLCAPGB / ANALYSIS SUM;
DEFINE REMAINING / ?????????????????????