Loading an Informix table with data created from a mainframe extract.
Posted in 1994
This question is in two parts: 01) I am using the Informix utility (LOAD) to load a flatfile (that was created from the mainframe then ftpped to the UNIX box) to a table. If the key in the flatfile does not exist in the table, I load it. If the key in the flatfile exist in the table, I don't load it (no problem, the table has a unique index, and the record is written to the error.log). OK. here's the problem: if the key is in the table, but not on the flatfile, that means it has been deleted from the master file on the mainframe and needs to be deleted from the table. Is there a way, via a store procedure or some slick Unix script that can compare the flatfile and table keys and delete the rows from the table that is not on the flatfile. I would like to avoid to have an application program written for this. What script and/or SQL commands will accomplish this? 02) Currently, I am manually signing on to the IBM mainframe, via ftp <mainframe TSO IP address>, to download the extract file to the RISC 6000 box. I would like to automate this via a script file and fired off by cron everynight. What is the syntax of the ftp script file to do this. Your help would be greatly appreciated! Thanks, Lenny Deckard. email: ldeckard@databank.com