Monday, June 22, 2009

Day 83 - Data Loaded into DB2 on Windows

We have finally received the database data from OS/390 in a format that we were able to load it without trouble in DB2 on Windows.

Some of the weird problems we got on AS/400 will no longer bother us but now, we have to rewrite some scripts because DB2 in Windows is different from DB2 on AS/400.

One of the problems was that I an insert into script that loads the postal code with almost 300000 records. I had to loaded it through the DB2 command line tool. Here's how one can do it:
  1. Open the DB2 Command Line Processor tool. Don' t just open a regular shell since it will not work, some environment settings are required.
  2. In the shell, execute the following commands:
db2 connect to {database} user {username} using {password}
db2 -vf {path/script.sql} -t > output.txt
Don't forget to have a tail and grep installed, if you wish to track the evolution of the script execution and check for operation success.

The entire process took about 6 hours, this includes taking the data from OS/390, moving it to Windows, load it into DB2 in Windows and preparing the staging area with look up and convert tables. Way to much time. This process will definitely be optimized.

We've also found out one of the most idiotic functionality in software I've ever seen.
After installing the database client on the local machines, and after configuring the server access, the Command Editor only allows one to open files from the database server computer. Yes, I mean it is impossible to open any local file using the Command Editor. And no, that is not configurable!

No comments:

Post a Comment