MCH1201 in XMLSERVICE when converting ccsid to UTF-8

Post Reply
graebert
Posts: 16
Joined: Fri Jan 20, 2012 6:30 pm

MCH1201 in XMLSERVICE when converting ccsid to UTF-8

Post by graebert » Wed Jul 13, 2016 5:52 pm

I use the XML Toolkit with CW to call RPG pgms and retrieve character data.
For some data the program call fails and the job running the XMLSERVICE program shows MCH1201 (Receiver too small)

Code: Select all

                          Nachrichtendetails anzeigen                          
                                                                               
 Nachrichten-ID . . . . :   MCH1210       Bewertung  . . . . . . :   40        
 Sendedatum . . . . . . :   13.07.16      Sendezeit  . . . . . . :   14:32:07  
 Nachrichtenart . . . . :   Abbruch                                            
 Von  . . . . . . . . . :   MECHURA       CCSID  . . . . . . . . :   65535     
                                                                               
 Von Programm . . . . . . . . . :   XMLSERVICE                                 
   Von Bibliothek . . . . . . . :     ZENDSVR6                                 
   Von Modul  . . . . . . . . . :     PLUGCONV                                 
   Von Prozedur . . . . . . . . :     CONVCALL                                 
   Von Anweisung  . . . . . . . :     4694                                     
                                                                               
 An Programm  . . . . . . . . . :   XMLSERVICE                                 
   An Bibliothek  . . . . . . . :     ZENDSVR6                                 
   An Modul . . . . . . . . . . :     PLUGCONV                                 
   An Prozedur  . . . . . . . . :     CONVCALL                                 
   An Anweisung . . . . . . . . :     4694                                     
                                                                               
                                                                   Weitere ...
------------------------------------------------------------------------------------------
                         Programminformationen anzeigen                        
                                                                Anzeige 1 von 7
 Programm . . . . . . . :   XMLSERVICE    Bibliothek . . . . . . :   ZENDSVR6  
 Eigner . . . . . . . . :   ZENDADMIN                                          
 Programmattribut . . . :   RPGLE                                              
 Detail . . . . . . . . :   *BASIC                                             
                                                                               
                                                                               
 Informationen zur Programmerstellung:                                         
   Programmerstellungsdatum/-zeit . . . . . . . . :   21.01.15  11:10:23       
   Programmart  . . . . . . . . . . . . . . . . . :   ILE                      
   Modul der Programmeingangsprozedur . . . . . . :   XMLSERVICE               
     Bibliothek . . . . . . . . . . . . . . . . . :     XMLSERVICE
 

Prerequisites:
  • IBM i V7R1
    ZendServer 8.5.3 (php 5.6)
    PHP Toolkit for IBM i 1.6.1

    i5_pconnect with private stateful connection
    ccsidBefore = 1208/1141
    ccsidAfter = 1141/1208
    useHex = true
Error condition:
  • - RPG-Programm has character parameter (let's say length of 35) to output customer name
    - When the name contains special german characters, sometimes all works well, sometimes XMLSERVICE gets MCH1201
    - Example: Name "Gräbert" in a 35 Byte character Field is no problem, but name "Gräbert Software + Engineering GmbH" in the same field produces MCH1201
My guess:
In 1141 the german characters (like ä in Gräbert) use 1 Byte, in UTF-8 more than 1 Byte is needed. So when the name is long enough or contains many special characters, the UTF-8 representation eventually needs more Bytes than the original parameter length (which could possibly force MCH1201).

Does anyone have the same experience? What should i do? What does Tony Cairns think about my guess?

Best regards,
Christian

Post Reply