VUBDF : Dump archive file

Author: Syd Hall, Crystallography Centre, University of Western Australia, Nedlands 6907, Australia

VUBDF prints the contents of any bdf (archive or auxilliary) in terms of physical records, logical records and packets. No knowledge of the structure of the bdf or the logical records is assumed. VUBDF identifies each word in the bdf as containing character, integer, packed, real or void information and lists it accordingly.

Output Controls

VUBDF can be used to list a part or all of the contents of a binary data file. If no parameters are entered, VUBDF lists up to 100 packets of all logical records on the archive bdf.

VUBDF was originally written as a "developer's tool" and its use may require some knowledge of the structure of the bdf, as described in the BDF chapter at the back of this manual. It is, however, easy to apply and will be useful to any anyone requiring detailed information about the data stored on the bdf. See also the arcout option of the program CIFIO .

Here is a description of the optional control parameters. They may be entered in any order.

file extension

This parameter is used to specify the filename extension code of the bdf to be listed. The default input file is the archive bdf. The codes a and b refer to the input and output archive bdfs, respectively.

prec rmin rmax

These parameters specify the range of physical records, rminto rmax,to be listed. The default values of rminand rmax are 1 and 10000, respectively, provided the lrec parameter (see below) is not specified. Specification of the lrec parameter overrides the prec parameters. If rmaxis omitted it is assumed equal to rmin.

lrec lmin lmax These parameters specify the range of logical records, lminto lmax, to be listed. The default values of lminand lmaxare 1 and endrecord: , respectively. Specification of this parameter overrides the prec parameters. If lmaxis omitted it is assumed to be equal to lmin. See the Archivesection of the manual.

npak pmin pmax

These parameters specify the range of packets, pminto pmax, listed from each logical record. The default values of pminand pmaxare 1 and 100, respectively. If pmaxis omitted then it is assumed to be equal to pmin.

xform

This code switches off the format checking routine that assumes the format of each packet in a logical record is the same. This is important when examining some auxilliary bdfs (e.g. plot command files such as ortand con).

Output Formats

The start of each physical record or logical record is identified with a header line that lists the three 'lead words' containing the logical record length, logical record type and packet size. The words within this logical record are numbered sequentially according to their position in the physical record.

Each word in the bdf is then listed as either a character string, integer number, packed-integer, real number or voidflg:. These words are listed in their packets. The start of each packet is identified by a '>' immediately following the word numbers. The formats of the different words types are as follows:

Character strings

A word is listed as a string of characters (length mxchwd: ) if, and only if, every byte in a word is one of the following characters A-Z 0-9 : * / + - . , ( ) < > [ ]. Bytes representing other characters (including a-z) will cause the word to be treated as one of the other types. Note that the character 'blank' will be listed as a tilde ~(the tilde is not present on the bdf). It is occasionally possible that the bits of a real number can satisfy the character test and be listed as characters.

Integer number

A word is listed as an integer when the real number has a remainder, modulo 1.0, of exactly zero. It listed in the format I5.

Real number

A word is listed as a floating-point number provided it has a value between -large: and -small: or between +small: and +large:. The real number is listed in the format F9.5 if it is less than 1.0, otherwise in F9.3.

Void number

A word is recognised as a 'void number' (i.e. value unknown) if it contains a real number equal to voidflg:. The void number is listed as the 'at' character @.

Packed integer

A word is listed as a packed integer if it is not identified as any of the above word types. This word is output as a hexadecimal integer (i.e. radix 16) of 8 digits length. No attempt is made to unpack these integers since the size of the bit slices is unknown. Note that some packed integer words may be interpreted as real numbers.

File Assignments

Reads a specified file (default is the input archive bdf)

Examples

VUBDF

List contents of the input archive bdf.

VUBDF file b lrec 8

List contents of the logical record 8 of the output archive bdf.

VUBDF file ort prec 23 25 xform

List the contents of physical records 23 to 25 from the bdf ORT.