Thanks. Your output confirms what I thought for the first DC statement.

 As Jonathan pointed out, I accidentally deleted the second DC statement when I 
was cleaning up my example. Here's the source again. No cleanup this time.
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')
         DC    C'&SRC'
*
         END

 Regards,John Ganci
 
 
-----Original Message-----
From: Willy Jensen <[email protected]>
To: [email protected]
Sent: Mon, Oct 10, 2022 9:51 am
Subject: SV: Question about X2C

Sure:

  Active Usings: None                                                           
   
  Loc  Object Code    Addr1 Addr2  Stmt  Source Statement                       
 

000000                00000 00001    2 TX2C1    CSECT                           
 
                                      3          GBLC &SRC                      
  
                                      4 *        Test X2C with EBCDIC '1' - 
X'F1'  
                                      5 &SRC    SETC X2C('F1')                  
  
                                      6          DC    C'&SRC'                  
  
000000 F1                              +        DC    C'1'                      
  
                                      7 *        Test X2C with ASCII '1' - 
X'31'  
                                      8 &SRC    SETC X2C('31')                  
  
                                      9          END                            
  

Regards
Willy

-----Oprindelig meddelelse-----
Fra: IBM Mainframe Assembler List <[email protected]> På vegne af 
John Ganci
Sendt: 10. oktober 2022 16:41
Til: [email protected]
Emne: Question about X2C

I'm a retired systems programmer, spending some time in retirement working on 
Don Higgins' z390 project (located at https://github.com/z390development/z390). 
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

Reply via email to