I was going to mention this but decided to keep my reply simple.

Yes, if the input contains an EBCDIC SUB (3F) the "at least one SUB output"
flag is still set. I think you could argue either way whether it should be
set in that case. The flag is documented as

CUNBCPRM_Substitution
Indicates to the caller whether the conversion service has converted
a character into the conversion table's substitution character.
Note: This bit has to be reset by the caller.
- 0: Indicates that the conversion service did not substitute.
- 1: Indicates that the conversion service converted at least 1
character into the conversion table's substitution character (or the
service was already called with bit set to 1).

So the software and the documentation are consistent: "a character was
converted into SUB." Whether that is the best design is something good
people might debate. (No debate about whether the parenthetical expression
is well-constructed.)

The reason the service does not clear it is that many of the flags indicate
a kind of "cumulative state" so that you can translate a large stream of
data in chunks; for example, if the "chunk" ended in the middle of a DBCS
pair.

And don't anyone get me wrong -- it's a good service; I really like it. It
has enabled a very powerful feature in the product with little effort on my
part.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Paul Gilmartin
Sent: Wednesday, June 13, 2012 5:53 PM
To: [email protected]
Subject: Re: Anyone a Unicode Services expert? -- roundtrip conversion

On Wed, 13 Jun 2012 17:30:41 -0700, Charles Mills wrote:

>FWIW, z/OS Unicode Services does indicate that at least one SUB 
>character was output. It's not an error (RC still = 0) but it is a 
>documented output status bit flag.
> 
What avail is this if SUB is a valid character in the input code page?

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

Reply via email to