|
On Thursday 17 July 2003 17:01, John Cunha wrote: > Hi Matt, > Thanks for answering... > Yes, CPYTOIMPF works... but it does not remove blank space in the > fields. It uses the original field length as the delimiter. > e.g. > > Record# > ....5...10...15...20...25...30...35...40...45...50...55...60...65 > 1 RS|A|450100010 |45-01-999 |3 |3 |SECONDS > |___ _____| > \/ > DEAD SPACE > Should look like this > > 1 RS|A|450100010|45-01-999|3|3|SECONDS Hi John I was just about to post to say my open source (topic of the day it seems <g>) CRTCSVDTA - http://www.dbg400.net/crtcsv.html - utility strips trailing spaces from character fields and will dynamically convert any file, but I see Tim Chrysler has beaten me to it ;) Depending on your needs you may want to use the RPG code as a template for your own application instead of using it as is, if you want to do anything else to the data before spitting it out as tab delimited. Also note as Tim pointed out, you'll need the main DBG/400 routines installed first - http://www.dbg400.net/dbg400.html - for some common programs & files. 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 Debian GNU/Linux | 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 copyright@midrange.com.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.