On Mon, 22 Sep 2014 12:01:48 -0400, Mark Jacobs <[email protected]> 
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)
>
>site encoding=mbcs
>
>site mbdataconn(IBM-037,UTF-8)
>
>site unicodefilesystembom=always **
>
When you say "send a mainframe file to another server" it sounds like you mean 
the FTP client is on the mainframe end of the transfer. If that is the case, 
you want "locsite" rather than "site". The following should work. It involves 
sending a 3-byte data set or USS file that contains only the BOM (hex EF, BB, 
BF), and then appending the text data set or USS file to it.

binary
put omfile destfile
ascii
locsite encoding=mbcs
locsite mbdataconn=(IBM-1047,UTF-8)
append textfile destfile

The "unicodefilesystembom" parameter is only for data coming to the mainframe.

This USS command will create a USS file named omfile (to use an innocuous 
sounding name) with the BOM:
printf "\xef\xbb\xbf" >omfile

Bill

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to