mattbarnes
Programmer
Hi all.
I have an issue in COBOL. I have 12 tables, aptly named Table01, Table02, Table03, etc based on the month of the year.
In my cobol code, I specify:
EXEC SQL
INSERT INTO TABLE01
(field1,
field2,
etc)
I also want to be able to insert to another table (February for instance) with the exact same data... My question is... Do I need to create an entirely new DB2 Insert structure replacing the table name or can I use the same structure with the table name being a variable of some sort?
The issue comes in that I have 12 tables. All 12 tables have the same 50 fields. I would hate to have 12 inserts to the tables, listing all 50 fields 12 times.
Any help?
I have an issue in COBOL. I have 12 tables, aptly named Table01, Table02, Table03, etc based on the month of the year.
In my cobol code, I specify:
EXEC SQL
INSERT INTO TABLE01
(field1,
field2,
etc)
I also want to be able to insert to another table (February for instance) with the exact same data... My question is... Do I need to create an entirely new DB2 Insert structure replacing the table name or can I use the same structure with the table name being a variable of some sort?
The issue comes in that I have 12 tables. All 12 tables have the same 50 fields. I would hate to have 12 inserts to the tables, listing all 50 fields 12 times.
Any help?