Concerning the error code:
122 is equal to 120 (the number of generalized eigenvalues to be computed) + 2
So the interpretation of the error code as given by lapack is :
After reordering, roundoff changed values of some complex eigenvalues so that leading
eigenvalues in the Generalized Schur form longer satisfy DELZTG=.TRUE. This could also
be caused due to scaling.
I think that the problem of scaling is due to your steadystate file, which defines the point where the jacobian of the model is evaluated. If you look at the values in matrices e and d (in dr1.m), which are built from the jacobian, you will see very huge crazy numbers. For instance, in matrix e the ratio between the maximum element and the minimum element is of order 10^9 !
I don't know if there is really (and where) a unit root in your model.... But even if you have a unit root (or more than one) you should have some long term relationships between the non stationary variables. The steady state provided to Dynare should be consistent with these cointegration relationships... But your routine doesn't ensure that these relationships are satisfied.
Stéphane.