We don't use Unix for any of our production business applications. If we were "starting from scratch" I imagine we might choose to use Unix files for many things, but I can't see us going this direction now.
This is an existing process with an existing MVS data set, and up until a couple of days ago it was treated (on the remote side) as just a standard "ASCII" file. A couple of days ago a user entered as last name with a lower-case 'a' with an accent, causing a two-byte character to be used where it had always been a single byte before. 🙁 ________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Sunday, November 15, 2020 4:15 PM To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU> Subject: Re: FTP converting between UTF-8 and EBCDIC On Sun, 15 Nov 2020 22:44:05 +0000, Frank Swarbrick wrote: >I couldn't find this actually stated anywhere, but it looks like if you want >to use z/OS FTP to transmit a UTF-8 encoded file to (and I assume from) an >EBCDIC codepage you have to use multi-byte encoding instead of single byte >encoding. The z/OS file also has to be variable length, not fixed length. > Why bother? Just transfer in binary to a z/OS UNIX file. ISPF Edit, for example, handles that format splendidly, subject to the display capability of the attached terminal; even automatically if the file is tagged as CCSID 1208. >Here is an example using curl. Note that this works even on standard Windows >10, as curl.exe is now provided with Windows 10. If you are using PowerShell >instead of CMD.exe you need to specify "curl.exe" instead of just "curl". >Search the internet for why, if you care. > >curl --user DVFJS --ftp-ssl --insecure --use-ascii --quote "site >mbdataconn=(ibm-1140,utf-8) encoding=mbcs" --upload-file >20201106180101ICMUpload.txt ftp://ZOSD:8443/'DEV.RXMTIN.ICM.ICMM2M.VB' > >"--insecure" is necessary for me because we have a self-signed FTP server >certificate. It may not be necessary for you. > >Note that this is only required if the source file actually has one or more >multi-byte UTF-8 codepoints. A UTF-8 file that only has single-byte >codepoints is identical to a standard 7-bit ASCII file and can be transmitted >using a default sbcs encoding. > >I honestly was surprised this work, as the documentation (as I read it, >anyway) didn't seem to indicate that conversion between a multi-byte codeset >(UTF-8) and a single-byte EBCDIC codeset (IBM-1140, in this case) is possible. > But apparently it is. Note that I didn't test anything where the EBCDIC >codepage does not have a corresponding codepoint for a particular character. >The character in question in this example is "�", which is code-sequence >x'C3A1' in UTF-8 and x'45' in ECBDIC-1140. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN