Re: Unload a fixed width file
Posted in 2003
Kennedy, Randy wrote: > I have created a table to use as a repository for a SP. When it is all > done, I want to unload that table to a file. I have searched through all > manuals for the unload statement and can't find anything about how to unload > to a fixed width file (based on field setups, they are all char(of the > correct length for layout) with NO delimiter. > > Is this possible using unload? IDS 9.21HC5 on HPUX11 No, not using DB-Access. SQLCMD does have a fixed format output option, though. Judging from the code in output.c (output_sqlda_req()), when the format is fixed, no intermediate delimiter is produced, just like the doctor ordered. The code in the IIUG archive is pretty good - it does have a bug in the handling of CSV formatted data (actually, two, but one's a minor pecadillo, the other is a show-stopper). I've fixed that, but not yet released the fixed version to the IIUG (next week). It also can do sqlreload operations with -F csv now. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/