× 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.



Thanks so much. I've been looking at this for the past 2 days and just needed another set of eyes.

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


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: Tuesday, August 04, 2009 10:05 AM
To: Midrange Systems Technical Discussion
Subject: Re: CPYFRMIMPF Failing for Reason Code 9

Hi Mark
I have a feeling that you mistyped the size of the field
07 XHDATE Packed 2 0
surely it should be
07 XHDATE Packed 6 0



Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
midrange-l-bounces@xxxxxxxxxxxx wrote on 08/04/2009 09:38:45 AM:

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



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.