Hi, I can't figure out why this code is not working. I am trying to insert dummy rows into this data set when there are no observations found on it. If I run the proc sql alone, it will insert the rows. However, when I use the call execute if noobs=0, no observations are inserted. data _null_;
set msrflow.msrflow_loansfunded_10YR_append;
if nobs=0 then do;
call execute(
'proc sql;
insert into msrflow.msrflow_loansfunded_10YR_append
(
PRIMARY_LOAN_KEY
,INVESTOR_LOAN_ID
,SELLER_LOAN_NUMBER
,PNC_LOAN_NUMBER
,STATUS
,INVESTOR
,FUNDING_DATE
,NOTE_BALANCE
,NOTE_RATE
,SERVICE_FEE
,LTV
,FICO
,SRP_RATE
,SRP_AMOUNT
,PRODUCT
,ESCROW_FLAG
,PURPOSE
,TIMEFRAME
,PCT_TOTAL_UPB_PURCHASE
,PCT_TOTAL_UPB_REFI
,PCT_TOTAL_CNT_ESCROW
,PCT_TOTAL_CNT_NONESCROW
,WGT_AVG_10YR
)
values (0,"","","","","",.,0,0,0,0,0,0,0,"","","","MTD",0,0,0,0,0)
values (0,"","","","","",.,0,0,0,0,0,0,0,"","","","YTD",0,0,0,0,0)
values (0,"","","","","",.,0,0,0,0,0,0,0,"","","","LTD",0,0,0,0,0)
;
quit;'
);
end;
run;
... View more