On Mon, 22 Sep 2014 12:01:48 -0400, Mark Jacobs  wrote:

>One of my users is trying to send a mainframe file to another sever,
>converting it to UTF-8 with Byte Order Mark(BOM). So far he hasn't been
>able to get it to work, Has anyone here been able to do so? These are
>some of the things he's tried. (and variations of)
>
(Ignoring the BOM compulsion)

I was able to do this using the unusual FIFO facility of z/OS FTP,
performing the conversion with iconv(1).  On z/OS:

    user@HOST: cd /tmp/user
    user@HOST: mkfifo utfpipe
    user@HOST: ( cp "//'sys1.maclib(yregs)'" /dev/fd/1 |
        iconv -f IBM-1047 -t UTF-8 > utfpipe ) & 

(This might as well be done using a temporary file.)
Then on an OS X client (I rarely run FTP server on my desktop):

    516 $ ftp user@mvs
    220-FTPD1 IBM FTP CS V1R13 at LSTC3MVS.US.ORACLE.COM, 13:04:09 on 
2014-09-23.
    Password: 
    Remote system type is MVS.
    ftp> binary
    ftp> quote site UNIXFILETYPE=FIFO
    ftp> cd /tmp/user
    ftp> get utfpipe utf8
    local: utf8 remote: utfpipe
    ftp> quit

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to