I've had good success by saving the Excel as tab-delimited text, then using the PC5250 data transfer wizard to set up the .FDF and send it to the 400. CPYFRMIMPF works OK on tab-delim files too.
I've had good success by saving the Excel as tab-delimited text, then using the PC5250 data transfer wizard to set up the .FDF and send it to the 400. CPYFRMIMPF works OK on tab-delim files too.
Ken, Thanks for your help. I did save the Excel file as tab-delimited text, by when I tried with the CPYFRMIMPF command, I kept getting 'Null not allowed' in certain field msg. and it ended abnormally with reason code 4. Any idea? Winnie
Winnie, Download the CPYFRMIMPF PTF that will automatically convert NULLs to blanks and zeros for you. The problem is that your database fields do not have ALWNUL specified and your import file has "" null values in it. Alternatively, you could specify a dummy file that uses ALWNUL and then CPYF from that file to your real file. Chris
Chris, I was looking for the ALWNUL parm but couldn't remeber where I saw it before. Is it in the CRTPF command parm? Winnie
ALWNULL is a DDS keyword just like COLHDG or TEXT that specify at the field level. And, the CpyFrmImpF command has the parm is RPLNULLVAL(*FLDDFT) which would eliminate your need to use ALWNULL. Your version of CpyFrmImpf may not have this parm unless you download the PTF. Chris
Chris, What about using the dummy file as mentioned earlier? What do I have to do to allow Null values in the dummy file? Winnie
For each field that might contain a NULL value from the CPYFRMIMPF, specify the ALWNULL DDS keyword for that field and compile the dummy file. Chris
Chris, Thanks for your help. I also found a way to do it via Client Access transfer function, but it took a lot more steps. Winnie
Has anyone out there tried to download Excel file to AS400 PF? Any suggestions would be appreciated. Winnie
Chris, I tried with the ALWNULL keyword and it kept getting a 'data mapping error' on the last field in my record. What do you think caused it? Winnie