We are on V4R4 and I am using the following command to copy a file that was FTP'd onto the iSeries 400 and I want...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
to place the data into a physical file on the iSeries: cpyfrmimpf fromfile(inlib/infile) tofile(outlib/outfile) mbropt(*replace) strdlm(*none) flddlm('~') datfmt(*jul) datsep(*none).
The command runs fine and breaks apart the fields into the proper fields in the output file. I have an RPGLE program written to edit check some of the fields in the outfile. The program blows up when I try to read the file with a CPF5029 error that actually relates to a CPF5035 error reason code #19, which says an unexpected null field was found. The dds for the outfile has AWLNULL on all of the character fields and the RPGLE program is compiled with allow null values = *yes. Do you have any ideas or suggestions on what else I could do to be able to read this file? Any help would be greatly appreciated.
Drop the datfmt parameter and make sure the field is defined as character or zoned. Compile your RPG with FIXNBR(*ZONED *INPUTPACKED).
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Dig Deeper on RPG iSeries programming
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.