Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
IBM I 7.1
------------
Customer wants a UTF-8 text file, so we created a PF with data
encoded as CCSID(1208) and used FTP to do a PUT (Using BINARY mode)
onto their FTP server (NOT IBM I, probably Windows, not sure).
The customer came back and indicated that what they /really/ needed
is UTF-8 with <CR><LF> delimiters on each record.
When using IBM i to PUT an EBCDIC-encoded [ for example, CCSID(37) ]
to another system, if BINARY is not specified on the PUT then FTP
will translate the EBCDIC to ASCII and put <CR><LF> on each record on
the target file. We tried using FTP with the CCSID(1208) file, and it
seems that IBM i FTP also translates CCSID(1208) to ASCII during the
PUT.
NOT good.
After much experimentation and frustration, the solution which I
devised was to use CPYTOIMPF to copy the UTF-8 PF to an IFS file:
CPYTOIMPF FROMFILE(UTF8FILE) TOSTMF('/home/steve/test.txt')
MBROPT(*REPLACE) RCDDLM(*CRLF) STRDLM(*NONE) RMVBLANK(*TRAILING)
Then used FTP to PUT the IFS file (using BINARY mode) to the target
system.
This gave them what they wanted - Is there a better way?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.