I have a table in a DB, I need to create a dbf file in groovy. I am using sql.call and ResultSet to get data from a table. How can I generate a dbf file?
OutParameter CURSOR_R = new OutParameter() {
    public int getType() {
        return OracleTypes.CURSOR;
    }
}
def execute(Connection conn, String a, String b, String c, String d) {
    Sql sql = new Sql(conn)
    def ct = sql.firstRow("select max(cl_type) r from PRT.st c where a_id= ?", [a])
    Integer type = ct.r
    if (type==1){
        sql.call("{?=call  PRT.PKG_LT_ALL.cgt (a => ?, b => ?, c => ?, d => ?)}"
                , [CURSOR_R,
                   a,
                   b,
                   c,
                   d
        ]) {
            //ResultSet row_service -> reader.readResultSet(row_service)
        }
    }
}
 
    