Function generateDTS