CPYTOIMPF – PC .TXT file displaying as ‘garbage’

15 pts.
Tags:
AS/400 administration
Copy To Import File
CPYTOIMPF
IFS
Physical File
Hi, We are using a simple CPYTOIMPF command to move a Physical file to the IFS in a .TXT format. CPYTOIMPF FROMFILE(S4CMREP) TOSTMF(&TOIMPTF) + MBROPT(*REPLACE) RCDDLM(*CRLF) + STRDLM(*NONE) FLDDLM(*TAB) Where &TOIMPTF is a IFS Folder & file name. This was working correctly until we recently applied operating PTF's to the AS400. Now when we try to open the .TXT file, it is showing all funny characters. Anyone had this before? Is there a conversion table setting I need to check? etc Thanks Sally

Answer Wiki

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

Hi,

Have you tried changing the STMFCODPAG to *STDASCII or *PCASCII ?

Regards,

Martin Gilbert.

Discuss This Question: 4  Replies

 
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
  • SallyMackay
    Whe I try either of those options I get the following: Message . . . . : The copy did not complete for reason code 1. Cause . . . . . : The Copy From Import File (CPYFRMIMPF) command, or Copy To Import File (CPYTOIMPF) command could not be completed for reason 1. The reason codes are: 1 - The CCSID or code page value is not valid.
    15 pointsBadges:
    report
  • Junky
    Hi, This works for us - STMFCODPAG(437) Randy
    95 pointsBadges:
    report
  • Junky
    Also, if the file you are trying to output already exists on the IFS, rename it to something else. It's code page may not match what you are trying to output. The CPYTOIMPF should create a new one. Randy
    95 pointsBadges:
    report
  • Matrixpub
    Hi, Had the same problem, code below resolved it. CPYTOIMPF FROMFILE(&LIB/&FILE) TOSTMF(&STMF) + MBROPT(*REPLACE) STMFCODPAG(437) + RCDDLM(*CRLF) STRESCCHR(*STRDLM)
    10 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