Special character translation
search cancel

Special character translation

book

Article ID: 235430

calendar_today

Updated On:

Products

SOLVE:Operations Automation NetMaster Network Management for TCP/IP

Issue/Introduction

I send SNMP trap from Solve Opérations 11.9.

All works fine except for special character £ (EBCDIC) which is translated in # (ASCII).

I am not able to find good character or hexadecimal code (on EBCDIC side) to use to get the £ character using encode function with translate=ascii (on ASCII side).

 

Environment

Release : 11.9

Component : SOLVE:Operations Automation for z/OS

Resolution

This is an example to show that it can be done. 


The translate from 295 to 037 would need to cater for more than the 2 characters
mentioned in the issue.

It would also need to be done before the SNMP trap is built. 

The ENCODE of the trap with TRANSFER=BER would then use the SRC_CHARSET, TGT_CHARSET instead of TRANSLATE=ASCII. 

 

&source = &hexpack C17B7CC2            -* 295 A£àB          
&write data=&source                                       
&string = &trans x'7BB17C44' &source   -* trans to cp 037                     
&write data=&string                                       
&assign mdo=data map=$ddtranslate                         
&assign mdo=data.generalstring data=&string   -* put in mdo           
&encode mdo=data tgt_charset=utf8 src_charset=cp0037e     
&write Data=RC=&retcode FB=&ZFDBK MSG=&SYSMSG             
&assign vars=stringout from mdo=data.generalstring        
 &sl = &length &stringout                                 
 &write data=&sl &stringout                               
 &stringout = &hexexp &stringout                          
 &write data=&stringout              

 


When run -                                             
A#@B                                                 
A£àB                                                 
RC=0 FB=0 MSG=                                       
6  BtCµâ                                             
41C2A3C3A042