Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

EBCDIC / ASCII conversion

102 views
Skip to first unread message

a b

unread,
Jul 20, 2001, 11:28:02 AM7/20/01
to
Hi,

Does anyone got an EBCDIC / ASCII conversion array for special char ? (i
mean char like à é ù ç, etc ...)

I know it's just an array : one EBCDIC char mean one other ASCII char.

Sorry for my poor english, hope you understood.

Thanks for an answer.


Rick Price

unread,
Jul 20, 2001, 12:19:22 PM7/20/01
to
I don't think it's just an array. It also may depend on the EBCDIC
character set. I've got an idea that the same 'non standard' characters can
have a different hex value in different character sets. It always seemed a
nonsense to me, but as far as I can make out, back in the earlies IBM
allowed different countries to define their own character sets without
themselves defining anything apart from what they considered standard (US)
characters. So in the UK English character set the GBP symbol has the same
hex value as the USD symbol in the US English character set.


a b <a...@b.com> wrote in message news:9j9ibk$bob$1...@reader1.imaginet.fr...

Wayne McAlpine

unread,
Jul 20, 2001, 2:57:22 PM7/20/01
to
You can create a custom table to handle your conversion. Here's a link that
gives more details.

http://as400bks.rochester.ibm.com/html/as400/v5r1/ic2924/index.htm?info/cl/crttbl.htm

Thomas Raddatz

unread,
Jul 20, 2001, 4:28:36 PM7/20/01
to
You may try one of the system provided translation tables that you can
find in QUSRSYS. The translation can be done by the QDCXLATE API. The
API is described in the "System API Reference OS/400 National Language
Support APIs" manual.

*
* parameter list QDCXLATE
D YIOBuffLen S 5P 0
D YIOBuffer S 8192A
D YTranTable S 10A
*
* convert AS/400 273 to PC 850
C Eval YIOBuffLen = %size(%trimr(Y9WBuffer))
C Eval YIOBuffer = Y9WBuffer
C Eval YTranTable = 'Q273337850'
*
C CALL 'QDCXLATE'
C PARM YIOBuffLen
C PARM YIOBuffer
C PARM YTranTable
*

In order to find a matching translation table go to QUSRSYS and list
all *TBL objects that start with Q + yourAS400LanguageID. So I would
list all objects that start with Q273* for German.

The result would be:

Q273 *TBL
Q273A0MA5K *TBL
Q273A05A5U *TBL
Q273A7RA3B *TBL
Q273BFA4H *TBL
Q273BF437 *TBL
Q273BF850 *TBL
Q273BF856 *TBL
Q273337256 *TBL
Q273337437 *TBL
Q273337850 *TBL
Q273697037 *TBL

If I wanted to go to a PC then I would use Q273337850 since 850 is the
language ID for PC ASCII.

Hope it helps.

Thomas Raddatz

a b schrieb:

--
*=====================================================*

e-mail Adresse:
Thomas....@tools400.de

Homepage:
http://www.tools400.de

*=====================================================*

0 new messages