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



I'd try it once with the file upload wizard (in IBM file transfer product) to analyze the csv and create a compatible upload file. If the wizard finishes successfully, then compare your file to the one the wizard built...

Also, note the you can save the "FDF" definitions, and use that in the CPYFRMIMPF command. There's a parm on that command (FLDDFNFILE) that accepts a file and member reference to this FDF definition. This could help the CPYFRMIMPF command with its data conversion chores, but I don't really know for sure...

Personally, I'd use the IFS file api's to read the csv file directly, parsing out the data myself. It seems much safer than using the CPY*IMPF commands...

Hth,
-Eric DeLong

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Gary Kuznitz
Sent: Monday, February 10, 2014 4:46 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Transferring a CSV file to i5

I'm trying to transfer a .CSV file to an i5.

I tried using this cmd:
CPYFRMIMPF FROMSTMF('/home/garyt/LU127720140115.csv') +
TOFILE(KDICHANGES/AUDITCSV) +
MBROPT(*REPLACE) RCDDLM(*CRLF) +
ERRRCDFILE(KDICHANGES/AUDITERORS +
AUDITERORS) ERRRCDOPT(*REPLACE)
I'm getting this error:
Message ID . . . . . . : CPF2885 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 02/10/14 Time sent . . . . . . : 14:35:04
Message . . . . : Field Definition or Error file AUDITERORS in KDICHANGES not
allowed.
Cause . . . . . : File AUDITERORS in KDICHANGES is not the correct file type
for the copy command.
-- The Copy From Import File (CPYFRMIMPF) command require a source, DDM,
program described physical, or externally described physical file for the
Field Definition File (FLDDFNFILE) and the Error Record File (ERRRCDFILE).
Recovery . . . : Do one of the following to change the file name on the
parameter and try the request again:
-- Specify the correct file type on the FLDDFNFILE, or ERRRCDFILE
parameter.

I have the TOFILE created as:

R AUDITMEM
----------------------
SSN 4
MBRTYPE 4
NAME 35
SEQNUM 9
ADRSLN1 35
CITY 35
STATE 2
ZIP 5
ENRDT 8
The file is 130chs long.
I have created an error file called AUDITERORS

I have created the error file as:

R AUDITMEM
----------------------
RECORD 200
It has a member.

Does anyone have any ideas what could be wrong with the type of the error file?
Or what I am doing wrong?

Thanks,

Gary Kuznitz

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.