HP 3000 Manuals

Quoted BASIC (QB) andData Interchange Format (DIF) Files [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

Quoted BASIC (QB) andData Interchange Format (DIF) Files 

These files are in formats used by PC applications.  You can therefore
use HP ALLBASE/BRW to process data and create output files which can then
be accessed by PC applications.

QB and DIF files cannot be used as HP ALLBASE/BRW source tables.  QB and
DIF files are not described in a data dictionary.

Creating QBand DIF Files 

QB and DIF files are created when the report is executed, not when it is
compiled.  You can free the disc space by deleting the file with the MPE
command PURGE when data in a QB or DIF file is no longer needed.

[]
Note that with QB and DIF files you can specify a number on the Select/Sequence field to show the order in which the items will appear on each output file record. Quoted BASIC Format Quoted BASIC files are used as data transfer files by some standard programs, including Lotus 1-2-3, RBASE 5000, DBASE, and BASIC programs. DSG/3000 can also read Quoted BASIC files as free-formatted data files. In BASIC, quotes are used to delimit strings. File Layout. The items in the file are separated by commas; strings are enclosed in quotes; and numeric values can have decimals. Each record in a QB file has the same layout. An example QB file record is shown below. "15 Church Street", 1.02,"10:12:30", 1000, 0.5E+2 Between the comma and the value there can be any number of blanks. The file can contain strings (date, time, and ordinary strings) and numeric values (in teger, fixed-point numeric and floating-point real values). No other information is contained in the file. Data Interchange Format A DIF (Data Interchange Format) file is a standard file format used by different applications to exchange data. Visicalc, Lotus 1-2-3 and Charting Gallery can read DIF files. File Layout. A DIF file consists of two parts, a "header" part which describes the layout of data, and a "data" part which contains the actual data values. The header starts with the keyword TABLE, ends with the keyword DATA and contains the number of vectors per tuple and the number of tuples contained in the file. The data part starts immediately after the keyword DATA and ends with the keyword EOD. The data part is divided into tuples, and each tuple is then divided into vectors. Each tuple contained in the data part starts with the keyword BOT (Beginning Of Tuple). An example of a DIF file is shown on the next page. DIF File Layout Example ________________________________________________________________________ | | | TABLE | | 0,1 | | "" | | VECTORS Beginning | | of | | the | | Header | | part | | | | 0,6 | | "" | | TUPLES # | | vectors | | = | | 6 | | | | 0,2 | | "" # | | tuples | | = | | 2 | | | | DATA | | 0,0 | | "" | | -1,0 end | | of | | Header | | part, | | start | | of | | Data | | part | | | | BOT | | 1,0 Beginning | | of | | first | | tuple | | | | " January" | | 1,0 vector | | 1 | | of | | type | | string | | | | "01/23/1987" | | 1,0 vector | | 2 | | of | | type | | date | | | | "12:30:10" vector | | 3 | | of | | type | | time | | | | 0,235.78 | | V vector | | 4 | | of | | type | | numeric | | | | 0,75 | | V vector | | 5 | | of | | type | | integer | | | | 0,-.3E+2 | | V vector | | 6 | | of | | type | | real | | | | -1,0 end | | of | | first | | tuple | | | | BOT | | 1,0 | | " February" | | 1,0 | | "02/15/1987" | | 1,0 | | "12:10:01" | | 0,478.25 | | V | | 0,874 | | V | | 0,.23E-45 | | V Beginning | | of | | second | | tuple | | | | -1,0 end | | of | | second | | tuple | | | | EOD end | | of | | data | | | ________________________________________________________________________


MPE/iX 5.0 Documentation