Author: Robin Sulsona
Subject: Merge Statement issue resolved
Posted: Thu Jun 02, 2016 1:28 am (GMT 5.5)
Unfortunately, I am the first here to use the MERGE statement and none of the DBAs knew why I was getting the -254. One of them found that the table (clone) was in copy pending status but when I ran the image copy not knowing that I had to run a slightly different version of the copy my table was still in copy pending. So we didn't pursue that path any longer until I went looking to see if I had to do something special for the tablespace with the clone in it. Found I did and I then did that but it was then that I realized I was loading the clone table from the unload of the "master" table and the load cards didn't have a NOCOPYPEND on them. Once I fixed that in my process via "batch" FILE MANAGER, it loaded and the process ran. I have since run Day 9 and all is back to normal. But I also found that the first entry in the GET DIAGNOSTICS is more at the "process" level and that you really need to dump each individual CONDITION entry to see what if anything is wrong with that row of data. Once I did that and saw that I had a -904 then it was clear what I needed to do. It would have been nice to have had a simpler way to find this but I now know a lot more about the MERGE statement and will be able to put together a "needs to know" document for our internal Wiki so others will not have to go thru this pain.
_________________
Robin Sulsona
SAA
Subject: Merge Statement issue resolved
Posted: Thu Jun 02, 2016 1:28 am (GMT 5.5)
Unfortunately, I am the first here to use the MERGE statement and none of the DBAs knew why I was getting the -254. One of them found that the table (clone) was in copy pending status but when I ran the image copy not knowing that I had to run a slightly different version of the copy my table was still in copy pending. So we didn't pursue that path any longer until I went looking to see if I had to do something special for the tablespace with the clone in it. Found I did and I then did that but it was then that I realized I was loading the clone table from the unload of the "master" table and the load cards didn't have a NOCOPYPEND on them. Once I fixed that in my process via "batch" FILE MANAGER, it loaded and the process ran. I have since run Day 9 and all is back to normal. But I also found that the first entry in the GET DIAGNOSTICS is more at the "process" level and that you really need to dump each individual CONDITION entry to see what if anything is wrong with that row of data. Once I did that and saw that I had a -904 then it was clear what I needed to do. It would have been nice to have had a simpler way to find this but I now know a lot more about the MERGE statement and will be able to put together a "needs to know" document for our internal Wiki so others will not have to go thru this pain.
_________________
Robin Sulsona
SAA