just type the code in the editor. and then 'save as' 'all files' with the name filename.mod ( instead of saving as an mfile)
start the matlab program and go to the directory where your *.mod file is and type
>>dynare yourfilename.mod
it's OK!
^-^