CPYFRMIMPF CPF2845 reason code 10

15 pts.
Tags:
AS/400 command functions
AS/400 commands
CPF2845
CPYFRMIMPF
OS/400
V5R2
OS/400 V5R2. I'm running a CPYFRMIMPF to import a file from the IFS drive to a database file. this is the command:

CPYFRMIMPF FROMSTMF('/FTP/CPA/NUMERICT') TOFILE(ASPONITE/SCPA00_TMP) MBROPT(*REPLACE) RCDDLM(*CRLF) DTAFMT(*FIXED) STRDLM(*NONE) RMVBLANK(*NONE) FLDDFNFILE(ASPONITE/TBX400 SCPAFDF) RPLNULLVAL(*FLDDFT)

The to-file and the field definition file both exist and match each other. And yet I get CPF2845 reason code 10, which says the FDF is wrong.

This is the DDS source for the to-file:

A UNIQUE

A R SCPA00

A FILLER1 09

A INSTYP 02

A INSTID 10

A STATUS 01

A CRSREF 10

A LANGCD 01

A INSENM 36

A INSFNM 36

A BRCHNM 36

A BRCHAD 36

A PSTADDR 36

A TOWN 36

A PROVCD 04

A POSTCD 10

A CNTRY 20

A INSTIDCR 22

A MICRED 22

A SERVICE 01

A EXCHPT 06

A FBNKNBR 10

A EFFDAT 06

A FILLER2 50

A K INSTID

and this is the content of the FDF:

FILLER1 1 9 0

INSTYP 10 11 0

INSTID 12 21 0

STATUS 22 22 0

CRSREF 23 32 0

LANGCD 33 33 0

INSENM 34 69 0

INSFNM 70 105 0

BRCHNM 106 141 0

BRCHAD 142 177 0

PSTADDR 178 213 0

TOWN 214 249 0

PROVCD 250 253 0

POSTCD 254 263 0

CNTRY 264 283 0

INSTIDCR 284 305 0

MICRED 306 327 0

SERVICE 328 328 0

EXCHPT 329 334 0

FBNKNBR 335 344 0

EFFDAT 345 350 0

FILLER2 351 400 0

*END

Can anyone tell me what I am doing wrong?

Interestingly enough, we have another AS/400 running V5R4, and the exact same command with the exact same to-file and the exact same FDF works fine there.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try this.

CPYFRMIMPF FROMSTMF(”/FTP/CPA/NUMERICT’) +
TOFILE(ASPONITE/SCPA00_TMP) +
MBROPT(*REPLACE) RCDDLM(*CRLF) +
STRDLM(*NONE) RPLNULLVAL(*FLDDFT)

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Umpiredice
    Thanks, Teandy. Actually, I just figured it out, probably at the same time you were writing your answer. The issue was that my FDF had some comments in it, followed by a blank line, followed by the field definitions. In V5R2, CPYFRMIMPF does NOT like the blank line in the FDF! In V5R4, it doesn't care. Taking out the blank line solved the problem.
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following