Anne,
I'm not suggesting you don't use Scott Klement's examples - I expect you'll get much better control.
However, have you identified the cause of the error yet ?
Today I found and fixed an import error using a combination of DSPF and EDTF.
In my case, the import file has just a few fields/columns so it was an easy fix.
The basic commands DSPF and EDTF allow you to view and edit ascii files from a 'green screen', and will help
as you begin to develop your code to handle such files. Best of luck!
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Anne Boninsegna
Sent: Wednesday, January 14, 2015 9:25 AM
To: Midrange Systems Technical Discussion
Subject: RE: CPYFRMIMPF reason code 9
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?
As an Amazon Associate we earn from qualifying purchases.