If I got this right, you want to extract data from some table based on a specified month which is extracted from a parameter table. Well, you have at least two ways of doing this, both of them based on matching transformed dates.
The simple one would be to match numeric month/year:
[pre]
%Let Load_date = '01NOV2009'd;
proc sql;
select datepart(PARAM_DATE_LOW)
into :LOAD_DATE
from param_table
where PARAM_ID = 'TABLE1';
select count(*) into :SRC_REC_COUNT from SOURCE_TABLE_SRC
where month(data_column) = month(&LOAD_DATE) and
year(data_column) = year(&LOAD_DATE);
quit;
[/pre]
The other one would be to match alphas with the formatted date:
[pre]
%Let Load_date = '01NOV2009'd;
proc sql;
select datepart(PARAM_DATE_LOW)
into :LOAD_DATE
from param_table
where PARAM_ID = 'TABLE1';
select count(*) into :SRC_REC_COUNT from SOURCE_TABLE_SRC
where strip(put(DATA_COLUM,yymon6.))=
(select strip(put(datepart(PARAM_DATE_LOW),yymon6.))
from param_table
where PARAM_ID = 'TABLE1');
quit;
[/pre]
Code above
not tested.
Cheers from Portugal.
Daniel Santos @
www.cgd.pt