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



It will take you a lot less time to read this that to dig through all of Scott’s tutorial. This is the first one for input handlers http://www.ibmsystemsmag.com/ibmi/developer/rpg/input_handlers.

What you probably need is this one, which implements some error handling options and doesn’t require that the data items be in the same sequence as the columns in the table. http://www.ibmsystemsmag.com/ibmi/developer/rpg/flexible_input_handlers/

Download the source, make any changes you need, and away you go!

If you are interested, this latest one covers the downloadable template that we now use for all OA handlers. http://www.ibmsystemsmag.com/ibmi/developer/rpg/open-access-templates/




Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jan 14, 2015, at 11:24 AM, Anne Boninsegna <a_boninsegna@xxxxxxxxxxx> wrote:

I am using the ERRRCDFILE option in the command, but it's not very helpful as you can imagine. All the rows from my inbound file are listed in the member SPSPOERR.

In the meantime, I've downloaded Scott Kement's tutorial as advised... 91 pages of "short reading". :(

I've been using CPYTOIMPF for years without issue/modification (through release upgrades), but this is the first I've needed to toy with the inbound version.



-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Wednesday, January 14, 2015 10:19 AM
To: Midrange Systems Technical Discussion
Subject: Re: CPYFRMIMPF reason code 9

CPYFRMIMPF is awfully tough to handle when you need to deal with exceptions. Which is why I roll my own using the techniques I've learned following the Scott Klement tutorial on IFS.

I've never tried this, but if you want to try battling with CPYFRMIMPF for just a wee bit longer you may want to look at these parameters of CPYFRMIMPF Errors allowed . .
Error record file:
File . . . . . .
Library . . .
Member . . . . .

Perhaps the row you 'think' is the error isn't quite it.

When I rolled my own it:
- ran faster than CPYFRMIMPF
- gave me more granularity over exception reporting.
- didn't need modification with every release upgrade like CPYFRMIMPF will.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Anne Boninsegna <a_boninsegna@xxxxxxxxxxx>
To: "midrange-l@xxxxxxxxxxxx" <midrange-l@xxxxxxxxxxxx>
Date: 01/14/2015 09:57 AM
Subject: CPYFRMIMPF reason code 9
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



I've got the following command in a CL program:

CPYFRMIMPF FROMSTMF('/SPS/PO/F47011_01132015.TXT') +
TOFILE(IBIJDELIB/F47011SPS) RCDDLM(*CRLF) +
STRDLM(*NONE) FLDDLM(*TAB) +
ERRRCDFILE(IBIJDELIB/QCLSRC SPSPOERR) +
RPLNULLVAL(*FLDDFT)

I'm getting the following error:

9 - The data for the field SYDCP is not valid for the data type of the
TOFILE.

From what I can see, SYDCP should be receiving a value of 0. On the
IBMi, it is a packed field length of 5 with 5 decimals.

Can anyone help shed some light?





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

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