try {
con = Manager.getConnection(conName);
PreparedStatement st = qr.getStatement(con);
ResultSet rs = st.executeQuery();
IDataHelper dh = DataHelper.getInstance(dataClass);
Properties props = getStepProperties();
String charset = props.getProperty("charset");
String fileName = props.getProperty("file");
File fl = new File(fileName);
if (!createNewFile(fl))
throw new SysException("Cannot create file");
FileOutputStream fls = new FileOutputStream(fl.getCanonicalPath());
IRowFormat rf1 = rf;
if (rf1 == null)
rf1 = new DSVRowFormat();
int i = 0;
Object o = rowClass.newInstance();
while (rs.next()) {
dh.loadFromRs(tp_src, rs, o);
ctm.addRowAt(o, 0);
String s = rf1.format(ctm, 0);
fls.write(s.getBytes(charset));
fls.write("\r\n".getBytes(charset));
ctm.delRowAt(0);