Showing my ignorance of COBOL: Does a MOVE from EBCDIC->UTF-8 mean "Here's a 
variable defined as n EBCDIC characters, please move it to this other variable 
defined as (at least) n UTF-8 characters"?

If so, as Gil intimated, I wouldn't say there "is no technical reason". I can 
think of at least one problem: A UTF-8 string that contains characters from 
multiple UTF-8 blocks. For example, x'52' in EBCDIC 410 (Cyrillic) is a њ; in 
420 (Arabic) it's ؤ. There's no reason a UTF-8 variable cannot contain њؤ but 
if it does, you can't convert back to EBCDIC.

That's far from a rare issue--every EBCDIC code page has overlapping characters 
(if it didn't, it wouldn't be needed).

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Mike Schwab
Sent: Friday, January 2, 2026 5:48 PM
To: [email protected]
Subject: Re: Please vote for COBOL "idea" for reverse character translation

How about character 160 inverted Exclamation mark?

On Fri, Jan 2, 2026 at 3:05 PM Paul Gilmartin 
<[email protected]> wrote:
>
> On Fri, 2 Jan 2026 18:56:13 +0000, Farley, Peter wrote:
>
> >Currently Enterprise COBOL allows PIC X alphanumeric EBCDIC group and 
> >elementary items to MOVE to UTF-8 (PIC U) and NATIONAL (PIC N) group and 
> >elementary items with automatic character set translation, but the reverse 
> >MOVE is not allowed.  There is no technical reason why the reverse MOVE 
> >should not be allowed, since the character set translation logic is already 
> >in place for a PIC X MOVE into PIC U and PIC N.
> >    ...
> I suspect this uses internally something similar to:
> <https://www.ibm.com/docs/en/zos/3.2.0?topic=functions-iconv-code-conv
> ersion>
>
> How should COBOL handle/report all the errors described there, some of 
> which occur only in the "reverse" (from U)  direction?
>
> >I have a bit more detail on the subject in the "idea" summary, please read 
> >those details at the "ideas" page and vote for it.
> >
> >https://ideas.ibm.com/ideas/COBOLVUE-I-427
> >
> >TIA for your votes.
>
> -
> gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN



--
Mike A Schwab, Springfield IL USA
Where do Forest Rangers go to get away from it all?

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

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

Reply via email to