Hi, I'm looking for a way to delete all the rows of a certain DB2 table,
And then insert new rows from a flat file. all this only in DS and not in the JCL by loading a dummy file before
Any ideas?
Delete rows before inserting
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 78
- Joined: Fri Mar 02, 2007 4:54 am
- Location: CHENNAI
Hi I don't know about the MVS edition, but check for "open command" property and if it is available, you can put the table truncate command there. This open command will be processed before the row level transactions are made.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
"Replace existing rows completely" performs a DELETE then an INSERT on each row processed. It does not clear the table.
In MVS edition you don't really have an alternative, unless you want to create a routine to delete all rows from the table.
In MVS edition you don't really have an alternative, unless you want to create a routine to delete all rows from the table.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.