Re: uploading flag files
Posted in 1993
}->From: davids@Software.Mitel.COM (David So) }->Subject: uploading flag files }->Date: 22 Jul 93 20:34:07 GMT }->Reply-To: davids@Software.Mitel.COM (David So) }->Organization: Mitel. Kanata (Ontario). Canada. }-> }->Informix has export/import/load/unload facilities. }-> }->However, does it have any utility to upload an external flat file }->such as a data file with comma as a delimiter; and also }->provide us control of loading? }-> }->thanks/david }->-- }->David Y. So }->Mitel Corporation Phone: 613-592-2122 x3018 }->350 Legget Drive, Kanata Fax : 613-592-4784 }->Ontario, Canada K2K 1X3 Email: david.so@Software.Mitel.COM } }Sounds like you need to look more closely at DBLOAD. } }DBLOAD gives you a great deal of control over the processing of your input, }which can be in fixed or variable format. You can specify how frequently to }commit inserts, the number of bad data records to process before aborting, }whether or not to lock tables during loading, etc. } True, however we have found that is is much easier to control the process by using DBLOAD to dump data into a temp table and then use 4GL and/or ESQL-C to handle real control of the load process into a systems online tables. Also, we have found fixed format easier to deal with than variable (for reasons stated below). }The DBLOAD utility allows you to specify your delimiter character. You }can also use the DBDELIMITER environment variable, which is referenced by }all Informix program products, so far as I know. } }If you data is "quote and comma delimited", instead of just comma delimited, }then you will need to preprocess it. Unlike dBASE and various spreadsheet }programs, Informix will consider the quotes to be part of the data, rather }than part of the delimiter. } This is the classic case why fixed format is easier to deal with when using DBLOAD. Since DBLOAD does not support standard CSV files with quotes, you are forced to strip quotes and use a different delimiter other than the coma (in case you might have commas with the quoted data fields - again, the purpose of quotes). Now you have to find a delimiter the you know will NEVER be used in the data, or more likely prepocess the data into a fixed format before you use DBLOAD. Jeff Jeffrey D. Hanan hanan@abq.bdm.com Phone:(505) 848-5362 Fax: (505) 848-5720