;Example of bdbfs plugin file.
;Make all character fields UPPER.

#include clipper.ch

cCodePage:='cp866'
nFields:=0
nRec:=RECNO()

_UP_bFor:={|_1| FieldPut(_1, UPPER(FieldGet(_1)) ), nFields:=nFields+1}
_UP_bbFor:={|_1| VALTYPE(FieldGet(_1)) $ "CM"}
_UP_bWhile:={|| While("!EOF()",;
		"For(1, FCOUNT(), _UP_bFor, _UP_bbFor)", ".T.", .T.),;
		Nfind("Fields processed: "+NTRIM(nFields)) }

GO TOP

IF Continue("Do you want to convert all the fields to UPPER case?") .AND.;
    TryFlock()
//nested #IF example
	#IF Continue("Really?")
		Eval(_UP_bWhile)
	#ENDIF
ELSE
	Nfind("User break")
ENDIF

DBUnLock()
GOTO nRec

RELEASE nFields
RELEASE nRec
RELEASE ALL LIKE _UP_*
