finish generate general dat file method