There are three utility programs in the UWXAFS distribution for the manipulation the data files. These programs are interactive and are fairly straightforward to use. The only real complication is that UWXAFS binary files contain more than one record, so that the record key must be given in addition to its filename.
As discussed in section 3, the record of a UWXAFS binary file can be specified by either the numeric or symbolic key. For the data in a single file, the nkey and skey are redundant. The skey remains with the data record even when moved between data files. Furthermore the skey is essentially unique to the data in the record so that two records with identical skeys are almost guaranteed to contain exactly the same data and documents. In contrast, the nkey is just the index of where in the data file that record is kept.
All of these utility programs should be fairly self-explanatory, but a
synopsis of each will be given below. We should also say that other,
similar utility programs are available for free from
the XAFS Database at IIT. If you're using UWXAFS format files,
we highly recommend using the utilities from this database, including the
programs
record (nkey or skey)
At this prompt, you can type the nkey or skey of a single file to
convert. To reformat more that 1 record from a UWXAFS binary file, there
are two choices. You can either type two nkeys, separated by a comma, such
as 1, 5, which will, which will convert all records with nkeys
between 1 and 5, inclusive. Or you can type all, which will select all
records in the file. Typing lis will give a listing of all records in
the file, and typing help or ? will list of the above possible
responses.
After the record(s) to convert have been determined, you'll be asked for
the output file name. When converting more than one file, the files will
have the prefix you specify, and will have sequentially numbered
extensions, so that you'll get file names like cu.001,
cu.002, cu.003.
When converting from ASCII to UWXAFS files, there is no need to ask for the
record, so you'll be asked for the output file name. If this file already
exists, the data in the ASCII file will be put in the next available
record. If the output UWXAFS file does not exist, the data is put in the
record with nkey=1, but you will be asked to specify the file type.
Usually this will be the same as the file extension (that is
cu.xmu probably has file type xmu), and you can just hit
carriages return. See section 3 for the best file type to use
for each type of data.
After the reformatted file has been written you'll be asked if you want to
continue to do more reformatting of data files. The file names of the
previous time through will be used as defaults, so you should be able to
just hit return more. The principle advantage of this if you have
all and now want to
put all the ASCII files back together into a single UWXAFS file. If, for
example, you converted cu.001 to cu.xmu, and want,
continue, the default for the next input file will be cu.002, and
you can just hit return until the program ends (when it gets to a file it
can't find) to reconstruct the original file. This is necessary if the data
is to be transported machines. The binary format is highly dependent on
operating system and machine architecture. (The programs
This will copy part (or all) of the contents of a UWXAFS format file to another UWXAFS format file.
This will list the records in a UWXAFS format file, and write out part (or all) of the documentation for the records in the file. The outputs can be written to the screen or to a file.