mathLib.decimals() システム関数は、数値変数を定義したときに指定した小数点以下の桁数を戻します。
mathLib.decimals(numericVariable DECIMAL in) returns (result INT)
myVar BIN(9,4); result = mathLib.decimals(myVar); // result = 4