|
The latest Club Tech iSeries Programming Tips Newsletter noted that the CPYFRMIMPF command fails when it encounters a null value in a csv file (i.e., when it encounters two commas next to one another). This is true. You will get a message like this one in the job log: > CPYFRMIMPF FROMSTMF('/home/kcookson/plikes2.csv') TOFILE(IFSDEVLIB/PLIKES) MBROPT(*REPLACE) RCDDLM (*ALL) File QACP334906 in library QRECOVERY was created. The copy did not complete for reason code 4. The copy did not complete for reason code 4. The copy did not complete for reason code 4. 5 records copied from member QACP334906. Copy command ended because of error. However, you can avoid this problem by using the RPLNULLVAL(*FLDDFT) parameter. The command will look like this: CPYFRMIMPF FROMSTMF('/home/kcookson/plikes2.csv') TOFILE(IFSDEVLIB/PLIKES) MBROPT(*REPLACE) RCDDLM(*ALL) RPLNULLVAL(*FLDDFT) This places field default values (usually spaces or zeros) in the database file when a null value is encountered in the csv file. Thanks, Kelly __________________________________ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861
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.