format is used to produce formatted output. format outputs the characters of control-string, except that a tilde (~) introduces a directive. The character after the tilde, possibly preceded by prefix ...
There is also write support for all the data formats, but not the metadata formats. The produced SAS7BDAT files still cannot be read by SAS, but feel free to contribute your binary-format expertise ...