<?xml version='1.0' encoding='UTF-8' ?> <EXPXML name="SCB.xml" fileout="C:/temp/TransferBank/SCB.txt" filetype="txt" processtype="file"> <INIT> double sum=0; Double d=null; Integer i = null; int reccount= 0; </INIT> <HEAD> <COL type="data" >fs.repeat(" ",8)</COL> <!-- Space : 8 --> <COL type="string" >M</COL> <!-- Trem-Payment : 1--> <COL type="data" width="6">dbInq.getString("mbank_company","bank_client")</COL><!-- comcode : 6 --> <COL type="data" width="30">dbInq.getString("mcompany","ename")</COL><!-- ชื่อบริษัท Eng : 30 ชิดซ้าย--> <COL type="string" >DA</COL> <COL type="data" width="6" dateformat="DDMMYY">DATE</COL> <!-- DDMMYY --> <COL type="data" width="5">fs.addBlank(5,"0",reccount)</COL> <COL type="formula">df.applyPattern("####.00");</COL> <COL type="data">fs.addBlank(11,"0",String.valueOf(df.format(sum)).replace(".",""))</COL> <COL type="string">I</COL> <COL type="data" >fs.repeat(" ",8)</COL> <!-- Space : 8 --> <COL type="string">newline</COL> </HEAD> <DATA> <COL type="data" width="10">dbInq.getString("accountno")</COL> <!-- : 10--> <COL type="data" width="6" dateformat="DDMMYY">DATE</COL><!-- รับมาจากหน้าจอ DDMMYY--> <COL type="string">0</COL><!-- เลขศูนย์ --> <COL type="formula">df.applyPattern("000000000.00");</COL> <!-- ของเดิม เป็น df.applyPattern("####.00"); --> <COL type="data" >fs.addBlank(11,"0","left",String.valueOf(df.format(d.parseDouble(dbInq.getString("amount")))).replace(".",""))</COL> <!-- ถึงหลักสตางค์ หากไม่ครบ 11 ตำแหน่ง เติมศูนย์ข้างหน้า : 11--> <COL type="formula">sum += d.parseDouble(dbInq.getString("amount"))</COL> <COL type="formula">reccount++</COL> <COL type="string">newline</COL> </DATA> </EXPXML>