I am having problem with date parameter not resolving when I tried bringing it as string . I used date parameter in proc sql in where clause . It brings no rows. Following is the code I used. Please help.
/* CONVERTs date parm as ''string data type FROM PARAMETER SCREEN 01/09/2008 */
DATA temp1;
FROM_DATE = ("&frdate");
TO_DATE =("&todate");
SASFROMDT=INPUT("&frdate",MMDDYY10.);
SASTODT=INPUT("&todate",MMDDYY10.);
CALL SYMPUT('SASFRDATE',SASFROMDT);
CALL SYMPUT('SASTODATE',SASTODT);
put SASFROMDT= SASTODT= ;
run;
%put &frdate &todate &SASFRDATE &SASTODATE;
PROC SQL;
CREATE TABLE trans_file AS SELECT DISTINCT TRANSACTION_HISTORY.DOCUMENT FORMAT=$63.,
datepart(TRANSACTION_HISTORY.TRANSACTION_DATE) FORMAT=date9. as TRANS_DATE,
TRANSACTION_HISTORY.TRANSACTION_DESC FORMAT=$255.,
TRANSACTION_HISTORY.ITEM,
TRANSACTION_HISTORY.SEQUENCE_NUMBER,
TRANSACTION_HISTORY.FIELD_CODE FORMAT=$63.,
TRANSACTION_HISTORY.FISCAL_YEAR FORMAT=$63.,
sum (TRANSACTION_HISTORY.TRANSACTION_AMOUNT) as TRANS_AMT,
TRANSACTION_HISTORY.ACCOUNT FORMAT=$63.
FROM ODSP.TRANSACTION_HISTORY AS TRANSACTION_HISTORY
WHERE datepart(TRANSACTION_HISTORY.TRANSACTION_DATE) = &SASFRDATE
GROUP BY VENDOR_ID,ACCOUNT
ORDER BY TRANSACTION_HISTORY.FUND ,TRANSACTION_HISTORY.ACCOUNT ;
QUIT;