Hello,
Following is a part of java program.
I am reading Result Set returned by Stored Procedure in db2 and writing that into a file.
I have used DataOutputStrea m dos to write read object into file.
int totRows = 0;
System.out.prin tln("Result Set"+(count-1)+" Writing into file...");
while (rs.next()) {
totRows++;
for (int i = 1; i <= col; i++) {
Object o = rs.getObject( i);
dos.writeChars( String.valueOf( o));
dos.writeUTF("\ t");
}
dos.writeUTF("\ r\n");
}
System.out.prin tln(totRows+" rows written...");
Output is : File contents r like
T A B L E N A M E T A B L E C O U N T
C U S T O M E R I N F O T A B L E 6666
........
......
n so on
I want it to look like
TABLENAME TABLECOUNT
CUSTOMERINFOTAB LE 6666
.............
Expect to get some help atleast this time!
Following is a part of java program.
I am reading Result Set returned by Stored Procedure in db2 and writing that into a file.
I have used DataOutputStrea m dos to write read object into file.
int totRows = 0;
System.out.prin tln("Result Set"+(count-1)+" Writing into file...");
while (rs.next()) {
totRows++;
for (int i = 1; i <= col; i++) {
Object o = rs.getObject( i);
dos.writeChars( String.valueOf( o));
dos.writeUTF("\ t");
}
dos.writeUTF("\ r\n");
}
System.out.prin tln(totRows+" rows written...");
Output is : File contents r like
T A B L E N A M E T A B L E C O U N T
C U S T O M E R I N F O T A B L E 6666
........
......
n so on
I want it to look like
TABLENAME TABLECOUNT
CUSTOMERINFOTAB LE 6666
.............
Expect to get some help atleast this time!
Comment