× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



All,

I am having an issue with CPYFRMIMPF. I have a VB program that creates a delimited file. I'm trying to use CPYFRMIMPF to copy the data into an iSeries database file. I'm getting a failure because of reason Code 9, 9 - The data for the field *N is not valid for the data type of the
TOFILE.

Is there any way to see for which field the data is not valid?

Here is the data stream:
55505, '1', 0, 'H', '55505', 20, 090804, 092444, 090428, 513, 'ES', 'CRAYOLA', 'CRAYOLA', 'CTR0361141003', '0', 20090424, ' ', 0, ' ', 3400, ' ', ' ', ' '

Here is the file layout:
01 XHCNTR Packed 5 0
02 XHTRNS Char 1
03 XHDST# Packed 2 0
04 XHRECD Char 1
05 XHBOL# Char 15
06 XHBLCC Packed 2 0
07 XHDATE Packed 2 0
08 XHHHMM Packed 4 0
09 XHYMD Packed 6 0
10 XHHM Packed 4 0
11 XHTIMZ Char 2
12 XHEDIC Char 17
13 XHEDI2 Char 17
14 XHCPO Char 22
15 XHRELS Char 15
16 XHPODT Packed 6 0
17 XHXREF Char 15
18 XHMSWT Packed 10 3
19 XHMSPC Char 5
20 XHMSLQ Packed 2 0
21 XHMSWQ Char 1
22 XHMSUM Char 2
23 XHMBOL# Char 15

And here is the command I'm using:

CPYFRMIMPF FROMSTMF('/home/mwalter/ob856hord.txt')
TOFILE(X12856HORD)
MBROPT(*REPLACE)
RCDDLM(*CRLF)
STRDLM('''')


BTW, I use this exact same procedure for another file, and it works just fine. This one has me really puzzled.

Thanks,

Mark


Mark Walter
Business to Business Data Integration Specialist
Certified IBM System i Specialist
Paragon Consulting Services, Inc
mwalter@xxxxxxxxxxxxxxx
717-764-7909 ext. 126




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.