Re: Converting data to Informix from PICK!
Posted in 1996
On Thu, 27 Jun 1996, Mike Segel wrote: } Nick Nobbe wrote: } [SNIP] } > } > Peter, } > I think most of us have done this. There is some tedium involved, } [SNIP] } > OK, so now you need a map of the database your coming from and } > of the one you're going to. What are the relationships? You will } > probably be forced to query the existing db to gather the data } } Uhmm Nick, it doesn't really apply. } } OK, heres the trick. } } First PICK comes in on many flavors. PC, UNIX, RT ect .... } For the most part, PICK is ASCII based not EBCDIC. } } OK so lets assume that its unix based. } } 1) Find out the tape format and blocking factors. } 2) use dd to read the first section in. } 3) use od to determine the file layout } 4) based on this information develop your table structures } 5) determine the subtable layouts based on either tagging } the fields of the master record, or just create a serial } column. } 6) Write the C program to read the tape in and pull the data off. } } Its really quite straight forward but not that simple. } Its the same way you can hack an Informix Archieve or read a } disk whose contents have been wiped. } } Of course this is all theory since I dont have a pick database to } play with. } } So it can be done. } Anyone with a Pick database I can play with. } Send me email about the database and tape types. } } -Mikey Mikey, I stand corrected. But here's where I take exception. If the flavor is Unix, why in heaven's name would you want to write, lint, compile, debug, etc., etc. a C program, when you can do it quick and dirty with the Unix toolset? I'm assuming you mean format the data for loading, not reading the tape, which task is done by dd (assuming your tape drive does its thing and handles the physical details of reading). Forgive me if I'm being over-literal. Just hoping to throw some light, not flame on the matter. Yours, Nick ********************************* Nick Nobbe, Library of Congress NLS/BPH mail: nnob@loc.gov *********************************