|
On Sat, 2005-02-26 at 10:30 -0500, rick baird wrote: > Andy, > > If none of these threads help you, you could give a freeware open > source utility a try - Martin Rowe has a utility called CRTCSVSTMF > that trims blanks from the resulting csv. > > Since v5r3, I've found it to be more stable and predictable than > CPYTOIMPF - especially with regard to code pages and CCSID. > > you can download at http://www.dbg400.net/ > > The best part is you have the source and can tweek it. In our system > we have several alpha fields with leading zeros, and when the csv is > opened in excel, it trims them. I modified my version to look for > long numeric strings ( 000000044394930384 for instance ) and if > found, it places a single quote at the beginning of the string. > > This keeps excel from trimming the leading zeros. Rick If you use the field mapping rules (EDTFLDMAP) in conjunction with CRTCSVSTMF, you can choose to set a field prefix of ' (or any other character) to character fields if you know they hold numeric data. I *thought* I'd uploaded this change some time back (added it summer '03) but it appears I hadn't - oops. Grab the latest version from http://www.dbg400.net/crtcsv.html Regards, Martin -- martin@xxxxxxxxxx AIM/Gaim: DBG400dotNet http://www.dbg400.net /"\ DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ / Source free test environment tools and others (file/spool/misc) X [this space for hire] ASCII Ribbon Campaign against HTML mail & news / \
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.