The following scripted actions show extra columns causing no difficulties for the import. Perhaps such a script offered for the failing scenario could clarify to the readers what is [going] wrong in the failing scenario.

create table qtemp/cust as
(select lstnam, state, zipcod
from qiws/qcustcdt
) with data
; -- Table CUST created in QTEMP.
CPYTOIMPF FROMFILE(QTEMP/CUST) TOSTMF(cust.csv)
STMFCODPAG(*PCASCII) RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM('"')
FLDDLM(',') NULLIND(*NO) DECPNT(*PERIOD) MBROPT(*REPLACE)
; -- All records copied from file CUST in QTEMP.
dspf cust.csv
; -- output from above dspf follows:
************Beginning of data**
"Alison","MN",56342 "Abraham","MN",56342 ************End of Data**
alter table qtemp/cust add column giorno date
; -- table that will be used for import has an extra column
CPYFRMIMPF FROMSTMF(cust.csv) TOFILE(QTEMP/CUST) MBROPT(*REPLACE)
STMFLEN(*TOFILE) RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM('"')
RMVBLANK(*NONE) FLDDLM(',') DECPNT(*PERIOD) DATFMT(*ISO)
FROMRCD(*FIRST) ERRLVL(*NOMAX) ERRRCDFILE(*NONE) ERRRCDOPT(*ADD)
RPLNULLVAL(*no ) /* using *FLDDFT works the same */
; -- 2 records copied to member CUST.
runqry *n qtemp/cust
; -- results from above query request follow:
Line ....+....1....+....2....+....3....+.
------ LSTNAM STATE ZIPCOD GIORNO
000001 Alison MN 56,342 -
000002 Abraham MN 56,342 -
****** ******** End of report *******

Regards, Chuck

On 23 May 2013 14:38, Matt Olson wrote:
It works fine with the table I have now, I can get all the data to
import just fine.

I added column to the file at the very end of the file I am importing
records into, then run the exact same command and instead of 220
records imported, we just get 0 records imported. No errors.

<<SNIP>>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.