;  Usage: DBDBF [ /N <new DBF file> ] [ /E <error file> ]
;               [ /C <config file> ]  [ /T <database type> ]
;               [ /M <tag>,<merge file> ] <DBF file>
;         Defaults:
;            New DBF file:  in current directory, name as DBF file,
;                           extension DBN
;            Config file:   in same directory as DBDBF.EXE, name DBDBF.CFG
;            Error file:    in current directory, name DBDBF.ERR
;            Database type: tag database
;  
;  
;  
; Noisy or not?
;verbose

; configure our merge files here
;mergefile "D:\\Users\\smikes\\dbdoc\\received\\L1.ACT","Alarm_Comment"
;mergefile "D:\\Users\\smikes\\dbdoc\\received\\L1.EDT","Units"
;mergefile "D:\\Users\\smikes\\dbdoc\\received\\L1.LDT","State"

; Fields which should be set to zero if they contain no values
zero "TRZERO"

; fields which should be blanked if the value they
; contain is zero
zero "VAL0" "SETPTVAL0" "HALARM" "H2ALARM"
zero "H3ALARM" "LALARM" "L2ALARM" "L3ALARM"
zero "H2DELTA" "H3DELTA" "L2DELTA" "L3DELTA"
zero "ALMINHST"

; MSDD feedback states
blank "FB1_0STATE" "FB1_1STATE" "FB2_0STATE" "FB2_1STATE" 
blank "FB3_0STATE" "FB3_1STATE" "FB4_0STATE" "FB4_1STATE"

; values of TAGTYPE/TRTYPE which should have dummy block numbers set
dummy "DEVSTAT" "INFI90"

; Only alarm comments 01-13 are observed; but it won't hurt 
; to have some extras
blank "ALRMCMNT01" "ALRMCMNT02" "ALRMCMNT03"
blank "ALRMCMNT04" "ALRMCMNT05" "ALRMCMNT06"
blank "ALRMCMNT07" "ALRMCMNT08" "ALRMCMNT09"
blank "ALRMCMNT10" "ALRMCMNT11" "ALRMCMNT12"
blank "ALRMCMNT13" "ALRMCMNT14" "ALRMCMNT15"
blank "ALRMCMNT16" "ALRMCMNT17" "ALRMCMNT18"
blank "ALRMCMNT19" "ALRMCMNT20"

; Blank out unused alarm priorities
blank "APRI_RTN" "APRI_ALRM" "APRI_BQ" "APRI_HI" "APRI_LO"
blank "APRI_H2" "APRI_L2" 
blank "APRI_H3" "APRI_L3" 
blank "APRI_HD" "APRI_LD" 
blank "APRI_HR" "APRI_LR" 
blank "APRI_SF" "APRI_UF" "APRI_UM" 

; Extras of these result in verbose messages: we can turn them off, or
; just turn off 'verbose'
mergefield "ALRMCMNT01","ALRMTEXT01","Alarm_Comment"
mergefield "ALRMCMNT02","ALRMTEXT02","Alarm_Comment"
mergefield "ALRMCMNT03","ALRMTEXT03","Alarm_Comment"
mergefield "ALRMCMNT04","ALRMTEXT04","Alarm_Comment"
mergefield "ALRMCMNT05","ALRMTEXT05","Alarm_Comment"
mergefield "ALRMCMNT06","ALRMTEXT06","Alarm_Comment"
mergefield "ALRMCMNT07","ALRMTEXT07","Alarm_Comment"
mergefield "ALRMCMNT08","ALRMTEXT08","Alarm_Comment"
mergefield "ALRMCMNT09","ALRMTEXT09","Alarm_Comment"
mergefield "ALRMCMNT10","ALRMTEXT10","Alarm_Comment"
mergefield "ALRMCMNT11","ALRMTEXT11","Alarm_Comment"
mergefield "ALRMCMNT12","ALRMTEXT12","Alarm_Comment"
mergefield "ALRMCMNT13","ALRMTEXT13","Alarm_Comment"
mergefield "ALRMCMNT14","ALRMTEXT14","Alarm_Comment"
mergefield "ALRMCMNT15","ALRMTEXT15","Alarm_Comment"
mergefield "ALRMCMNT16","ALRMTEXT16","Alarm_Comment"
mergefield "ALRMCMNT17","ALRMTEXT17","Alarm_Comment"
mergefield "ALRMCMNT18","ALRMTEXT18","Alarm_Comment"
mergefield "ALRMCMNT19","ALRMTEXT19","Alarm_Comment"
mergefield "ALRMCMNT20","ALRMTEXT20","Alarm_Comment"

; digital and MSDD states
mergefield "ZEROSTATE","ZEROTEXT","State"
mergefield "ONESTATE","ONETEXT","State"
mergefield "TWOSTATE","TWOTEXT","State"
mergefield "THREESTATE","THREETEXT","State"

; MSDD feedback states
mergefield "FB1_0STATE","FB1_0TEXT","State"
mergefield "FB1_1STATE","FB1_1TEXT","State"
mergefield "FB2_0STATE","FB2_0TEXT","State"
mergefield "FB2_1STATE","FB2_1TEXT","State"
mergefield "FB3_0STATE","FB3_0TEXT","State"
mergefield "FB3_1STATE","FB3_1TEXT","State"
mergefield "FB4_0STATE","FB4_0TEXT","State"
mergefield "FB4_1STATE","FB4_1TEXT","State"

;; Permissive state descriptors for RMCBs
;;
;; Need to use TEXT_SET to know which set to use.
;;
;;mergefield "PM1_0STATE","PM1_0TEXT","TEXT_SET(n)"
;;mergefield "PM1_1STATE","PM1_1TEXT","TEXT_SET(n)"
;;mergefield "PM2_0STATE","PM2_0TEXT","TEXT_SET(n)"
;;mergefield "PM2_1STATE","PM2_1TEXT","TEXT_SET(n)"

; analog units
mergefield "EUINDEX","EUDESC","Units"

; fields to suppress
;suppress "TAG_ID$"
;suppress "TIMESTAMP"
suppress "TAGTYPESRC"
;suppress "TAGUUID"
;
; regular expressions for the above include:
;
; "^TAG_ID$" - name exactly TAG_ID
; "_ID$"     - name ends in _ID
; "TAG_ID"   - name contains TAG_ID
; "^TAG"     - name begains with TAG

