CPYFRMIMPF command successfully copies to PF but resulted to special characters on PF

Tags:
AS/400
CL Program
CPYFRMIMPF
I have created new directory in AS/400 named MMVRADIR with subfolder MMVRAFLR. I have a CL program using CPYFRMIMPF command to restore the content of a txt file inside "MMVRADIR/MMVRAFLR/APDM082716.TXT" to AS/400 physical file SMREB33F. The CPYFRMIMPF was able to copy the contents but when I runqry the physical file I can only view a long highlighted line just like a bar with different colors per line and upon reviewing the content of APDM082716.TXT seem nothing wrong with the contents no special character or what so ever that may cause the garbage inside the PF. This is the CPYFRMIMPF command I used.
CPYFRMIMPF FROMSTMF(&PATH1) TOFILE(SMREB33F) +
MBROPT(*REPLACE) RCDDLM(*CRLF) +
STRDLM(*NONE) FLDDLM(',') RPLNULLVAL(*FLDDFT)


Software/Hardware used:
AS400
1

Answer Wiki

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

When you display a file and you see colors, it means there are characters in the string that are lower than a blanks X’40’. Do a DSPPFM and the do F10, then F11. Now you can see the contents in HEX. Find the bad value. I it is always in the same position, a quick replace  with a blank will fix it. It they are in different positions, you will need to do a scan and replace with a blank. 

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.
  • deepu9321
    Does your file contains any numeric data? Or, Is it just flat file?
    4,980 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.

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

Following

Share this item with your network: