chkformnewformThe FreeForm ND-based program newform4 is a general tool for changing the format of
a data file. The only required command line argument, if you use
FreeForm ND naming conventions, is the name of the input data file.
The reformatted data is written to standard output (the screen) unless
you specify an output file. If you reformat to binary, you will
generally want to store the output in a file.
You must create a format description file (or files) with format
descriptions for the data files involved in a conversion before you
can use newform to perform the conversion. The standard
extension for format description files is .fmt. If you do not
explicitly specify the format description file on the command line,
which is unnecessary if you use FreeForm ND naming conventions,
newform follows the FreeForm ND search sequence to find a format
file.
For details about FreeForm ND naming conventions and the search sequence, see Chapter 8.
The newform command has the following form:
For descriptions of the arguments, see Section 8.6.newforminput_file [-fformat_file] [-ifinput_format_file] [-ofoutput_format_file][
-ft "title"] [-ift "title"] [-oft "title"] [-blocal_buffer_size] [-ccount] [-vvar_file] [-qquery_file] [-ooutput_file]
If you want to convert an ASCII file to a binary file, and you follow the FreeForm ND naming conventions, the command is simply:
newform datafile.dat -o datafile.bin
where datafile is the file name of your choosing.
If data files and format files are not in the current directory or in the same directory, you can specify the appropriate path name. For example, if the input data file is not in the current directory, you can enter:
newform /path/datafile.dat -o datafile.bin
To read the data in the resulting binary file, you can reformat back to ASCII using the command:
newform datafile.bin -o datafile.ext
or you can use the readfile program, described in
Section 9.3.