CPYTOIMPF From Spool File Garbage

15 pts.
Tags:
AS/400
AS/400 Spool Files
CCSID
CPYTOIMPF
Hi. I'm trying to copy a report file from spooled output to a physical data file and from there to a stream file (as a .txt file) on the IFS. Once on the IFS, it's either sent out as a mail attachment via SNM by an MS Exchange Server or drag-drop'd to a desktop via iSeries Navigator. When the physical file or stream file is viewed on the iSeries, the data is legible. However, when viewed within Windows 8 via Notepad++, it's garbage. iSeries report contents (1st row):
UTLLBSR3    ARROW                                      SCM   CLAIMS DATA LOADED                   12/02/15   7:30:35  Page    1

Windows .txt file report contents (1st row):

"äãÓÓÂâÙó@@@@ÁÙÙÖæ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@âÃÔ@@@ÃÓÁÉÔâ@ÄÁãÁ@ÓÖÁÄÅÄ@@@@@@@@@@@@@@@@@@@ñòaðòañõ@@@÷zóðzóõ@@ׁ‡…@@@@ñ@@@@@"

iSeries OS V5R4

iSeries QCCSID = 65535

Physical file CCSID = 65535

Stream file CCSID = 1252
CPYTOIMPF FROMFILE(QTEMP/UTLLBS£3) TOSTMF('/home/reports/UTLLBS£3.txt') MBROPT(*REPLACE) FROMCCSID(1252) STMFCODPAG(*STDASCII) RCDDLM(*CRLF)
The iSeries is in the UK, and me and my VDI Windows machine are in Bermuda. Thanks Si


Software/Hardware used:
OS400 V5R4, iSeries Navigator V7R1, Windows 8, Notepad++, MS Exchange Server
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  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.
  • Splat
    Try *PCASCII in the STMFCODPAG parameter.
    12,875 pointsBadges:
    report
  • Fireloque

    Hi. I tried that first, but had exactly the same issue, which is why I switched to trying *STDASCII instead.

    Anyway, I've resolved this by creating the physical data file via DDS with a CCSID explicitly set as 1252, instead of being created as a 132 record-length file, which gave it the CCSID of 65535. The data then appears fine on both the iSeries and Windows.

    Thanks anyway!

    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.

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

Following

Share this item with your network: