DataBase Import/Export Utility

DBIO is a command line utility designed to import a PICS static database from (or export to) comma separated value (CSV) formatted ASCII text files. These CSV files may be opened with 3rd party programs (such as Microsoft Excel or Access) to view, and manipulate values. This is typically done when a large volume of changes is required, especially those that may be done using available search/replace facilities in 3rd party programs.

DBIO has undergone a major revision since this document was originally written. Everything following this point is new...

DBIO now exports (and ignores on import) column headers for each database field. The actual text of the headers is flexible and may be adjusted to suit your needs by altering the DBIO.INI file (located in the PICS\Config folder). DBIO is still strict on the column sequence, but the column names aren't important to it.

DBIO now accepts a number of different data formats for some fields. For example, hexadecimal values (in the form 0x012BD) may now be used for most numeric fields. This is especially handy for bit fields (like the flags field in the realtime table). IP addresses may be entered as a single large number, or using the standard dotted notation (e.g. 192.168.11.22).

Along with the new formats accepted, DBIO now performs some preliminary data validation while importing CSV data. Some questionable values are accepted, but will generate warnings; others will cause an error and the associated record will not be imported.  In general, you will want to correct all errors before attempting to use the database in PICS. DBIO also has a companion program (SDBCC) that looks at the imported databases as a coherent set and performs referential integrity checks. SDBCC should also run without error before the database is used in PICS.

The next section contains DBIO's online help display. This will be expanded in the next update of this document. (Note:  as of version 4.2, DBIO does not yet run SDBCC automatically, thos parameters are for a future version.)

dbio - PICS Static Database Import/Export 4.2
       Copyright 1993-2002 by Electronic Visions, Inc.
       All Rights Reserved

Usage:

  dbio {operation} [-csv:csvpath] [-sdb:sdbpath]
       [-table:name[,name[,...]]]
       [-nocc[:onerror|onwarn]] [-quiet] [-verbose]
       [-prompt:{start|always|never}] [-- sdbcc parameters]

  operation may be one of:
     import - Import .CSV files from csvpath to sdbpath
     export - Export .CSV files to csvpath from sdbpath
     genini - Generate default dbio INI file
     help   - Display detailed help information (this is it!)

  -csv:csvpath
     csvpath is the fully qualified path to .CSV file folder.
     If not specified, PICS RootData.Base\csv (typically
     C:\PICS\Data.Base\csv) will be used.

  -sdb:sdbpath
     sdbpath is the fully qualified path to the SDB (and
     *.ix*) files.  If not specified, then PICS RootData.Base
     (typically C:\PICS\data.base) will be used.

  -table:name[,name[,...]]
     optional list of tables to be imported (see list below)

  -quiet

  -verbose

  -prompt:{start|always|never}

  -nocc[:onerror|:onwarn]
     disable automatic run of SDBCC after DBIO completes.
     Add :onerror (or :onwarn) to disable SDBCC when DBIO
     encounters errors (or warnings/errors).

  -- sdbcc parameters
     Any parameters here are passed verbatim to SDBCC

  All tables will be converted if a '-table' parameter is
  not included.  Table names may be short or long names from
  the following list:

      Short  Long--------  Description-------------
       tv    Versions      Table Versions
       pt    Point         Point Table
       rt    Realtime      Real Time Values
       am    AlarmMst      Alarm Master
       aa    aAlarm        Analog Alarm
       da    dAlarm        Digital Alarm
       ccm   CCMst         Conversion Constants Master
       cc    CnvConst      Conversion Constants
       cpm   CPMst         Computed Points Master
       cp    CompPnt       Computed Points
       tpm   TPMst         Target Points Master
       tp    TargetP       Target Points
       csm   CalcMst       Calculations Master
       cs    Calcs         Calculations
       ctt   convtt        Conversion Type Text
       ct    convtype      Conversion Types
       ds    dispsets      Display Sets
       pc    picscolr      PICS Display Colors
       msg   message       Messages
       crv   curves        SPDS Curves
       al    audit         Audit Log
       cd    custdata      Customer Data