You would need to use the approach at
With a specific example, I could assist you in porting the code to Dynare 6.