SAS provides Kalman filter calls that make MLE possible for Kalman filter parameters. Details follow the link below.
http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/viewer.htm#timeseriesexpls_sect19.htm
Kalman Filter Subroutines    This section describes a collection of Kalman filtering and  smoothing subroutines for time series analysis; immediately  following are three examples using Kalman filtering subroutines.  The state space model is a method for  analyzing a wide range of time series models.  When the time series is represented by the state space  model (SSM), the Kalman filter is used for filtering,  prediction, and smoothing of the state vector.  The state space model is composed of the  measurement and transition equations. 
The following Kalman filtering and smoothing  subroutines are supported:  
KALCVF performs covariance filtering and prediction. KALCVS performs fixed-interval smoothing. KALDFF performs diffuse covariance filtering and prediction. KALDFS performs diffuse fixed-interval smoothing.