|
CPYTOIMPF converts nulls to nulls, fixed length character fields to fixed length delimited strings, and variable length character fields to variable length delimited strings. If a column in your table is defined with a fixed length data type that does not allow nulls, I don't know why you would expect the conversion to distort or truncate the value. For that data type a value of "" is not valid. You should only expect to reduce blanks if the blanks are reduced in variable length fields. Remember you're exporting from a database, not Excel. Your database isn't playing well with others, and you're blaming it on the system. -Jim James P. Damato Manager - Technical Administration Dollar General Corporation <mailto:jdamato@xxxxxxxxxxxxxxxxx> -----Original Message----- From: Ken.Slaugh@xxxxxxxxxx [mailto:Ken.Slaugh@xxxxxxxxxx] Sent: Thursday, August 14, 2003 8:16 AM To: Midrange Systems Technical Discussion Subject: Re: CPYTOIMPF and CSV Format Scott says: Though, on the other hand, people typically do have spaces in their PF, and people typically don't have spaces in their CSV's... so, in the real world, this isn't very practical. Someone should really point that out to IBM, maybe they'll add a new feature to the command... I totally agree. I wonder why IBM even has to be told. To me, this is another classic reason the 'iSeries doesn't play well with others'. Too bad it could have been avoided in Rochester. Unfortunately, I didn't create the original files containing the source data and preprocessing the 10.5gb within all 13 files is not an option due to time constraints. I'll be lucky to even get the CPYTOIMPF commands executed in time for conversion. Wish me luck, please, I think I'm going to need it. :) Thanks for the post Scott confirming my suspicions. Ken Slaugh (707) 795-1512 x118 Chouinard & Myhre, Inc. CA/400 Certified Specialist iSeries Network/MSE Administrator http://www.cm-inc.com/ Scott Klement <klemscot@xxxxxxxxxx To: Midrange Systems Technical Discussion om> <midrange-l@xxxxxxxxxxxx> Sent by: cc: midrange-l-bounces@x Subject: Re: CPYTOIMPF and CSV Format idrange.com 08/13/2003 10:27 PM Please respond to Midrange Systems Technical Discussion On Wed, 13 Aug 2003 Ken.Slaugh@xxxxxxxxxx wrote: > Anyone know how to get the CPYTOIMPF command to output CSV? Here's the > command I ran... [SNIP] > As you can see the record contains LOTS OF SPACES. Can they be eliminated > somehow to results in: Those spaces are actually in the PF you're copying the data from, it didn't add them. If you don't write the extra spaces to the PF in the first place (by using variable-length fields, etc) then your CPYTOIMPF won't have the extra spaces, either. Though, on the other hand, people typically do have spaces in their PF, and people typically don't have spaces in their CSV's... so, in the real world, this isn't very practical. Someone should really point that out to IBM, maybe they'll add a new feature to the command...
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.