Yep. I was cleaning up the source and deleted too many lines.
Your output confirms what I thought for both DC statements.
Regards, John Ganci
-----Original Message-----
From: Farley, Peter x23353 <[email protected]>
To: [email protected]
Sent: Mon, Oct 10, 2022 9:53 am
Subject: Re: Question about X2C
You left out the second DC statement so I put one in for you. Here is an
assembly:
Active Usings: None
Loc Object Code Addr1 Addr2 Stmt Source Statement
HLASM R6.0 2022/10/10 10.50
000000 00000 00002 1 TX2C1 CSECT
2 GBLC &SRC
3 * Test X2C with EBCDIC '1' -
X'F1'
4 &SRC SETC X2C('F1')
5 DC C'&SRC'
000000 F1 + DC C'1'
6 * Test X2C with ASCII '1' -
X'31'
7 &SRC SETC X2C('31')
8 DC C'&SRC'
000001 31 + DC C'.'
9 END
HTH
Peter
-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf
Of John Ganci
Sent: Monday, October 10, 2022 10:41 AM
To: [email protected]
Subject: Question about X2C
I'm a retired systems programmer, spending some time in retirement working on
Don Higgins' z390 project (located at
https://urldefense.com/v3/__https://github.com/z390development/z390__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!L-FXXm9eUUan5HDNBlVrf2NLkKg0s4uLsxz7svMm8IYtF-Qh_LwiZdBppPzRgxIiydHYsV32sZeRZQJ96EPnJ2YtPk7voTdCDfzKKFkv$
). A recent bug report for X2C behavior was reported and a fix provided.
However, I think the fix needs one final tweak. In order to confirm that the
final tweak is correct, I would like to see the real output of an assembly of
the following program.
TX2C1 CSECT
GBLC &SRC
* Test X2C with EBCDIC '1' - X'F1'
&SRC SETC X2C('F1')
DC C'&SRC'
* Test X2C with ASCII '1' - X'31'
&SRC SETC X2C('31')
END
Alas, I do not have access to a mainframe, so I am hoping someone could
assemble it and post the output. The code produces two DC statements - one for
EBCDIC '1' and one for ASCII '1'.
It is my opinion that the first DC statement should be "F1" for the leftmost
column of the output and "DC C'1'" for the DC statement; the second DC
statement should have "31' on the left and "DC C'<unprintable character>'"
for the DC statement.
If you're interested, you can see the issue by going the the z390 github site,
clicking on "Pull requests", clicking on the "Fix X2C and index issue ..."
entry, then scrolling through the comments.
Thanks. John Ganci
--
This message and any attachments are intended only for the use of the addressee
and may contain information that is privileged and confidential. If the reader
of the message is not the intended recipient or an authorized representative of
the intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and delete the message and any
attachments from your system.