Hi,
i am intended to develop an utility which does the following functionality. Reads a table and constructs the insert statements from that table entries. this utility will take table name as its input and constructs a flat file which contains the insert statements for that Table.
i have identified the key functions in that utility:
1) Get the description(number of fields and the attributes of those fields) of the table.
2)construct an dynamic sql CURSOR to fetch the values from that Table.
3) construct the format of the insert statement.
4) write it in a File.
As this utility has to do the functionality irrespective of any table (Dynamically) Please suggest me some ideas in doin the first Step.
also if u have done this previously please suggest me some guidelines in implementing the same
PLATFORM-MAINFRAMES OS/390
Language:COBOL/DB2
i am intended to develop an utility which does the following functionality. Reads a table and constructs the insert statements from that table entries. this utility will take table name as its input and constructs a flat file which contains the insert statements for that Table.
i have identified the key functions in that utility:
1) Get the description(number of fields and the attributes of those fields) of the table.
2)construct an dynamic sql CURSOR to fetch the values from that Table.
3) construct the format of the insert statement.
4) write it in a File.
As this utility has to do the functionality irrespective of any table (Dynamically) Please suggest me some ideas in doin the first Step.
also if u have done this previously please suggest me some guidelines in implementing the same
PLATFORM-MAINFRAMES OS/390
Language:COBOL/DB2