Converting metr_data_gen to iostreams.