For whatever its worth, once you determine what "ASCII" code page the source is 
in and what EBCDIC code page you want the result in you can use Enterprise 
COBOL native intrinsic functions to perform the conversion.  Let's assume(!) 
that the source code page is just the basic Latin-1/ISO-8859-1 (IBM CCSID 819) 
and the EBCDIC code page is U.K. Latin-1 (CCSID 285)...

MOVE FUNCTION DISPLAY-OF ( FUNCTION NATIONAL-OF (ASCII-IN, 819) , 285 ) TO 
EBCDIC-OUT

The "inner function" converts from ASCII CCSID 819 to UTF-16, and the outer 
function converts from UTF-16 to EBCDIC CCSID 285.

This doesn't, of course, answer the question of what the source code page is.  
They either need to tell you or it needs to be provided as part of the protocol.

Frank
________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Wendell Lovewell <wlovew...@mackinney.com>
Sent: Monday, February 19, 2018 8:38 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Cobol EBCDIC to ASCII

Hi Scot.

It appears that EZACIE2A and EZACIA2E are aliases for EZACICTR.A, which is 
described in
http://www-01.ibm.com/support/docview.wss?uid=swg21256665

This isn't really a COBOL answer, but it seems to me you could replace the 
table names in EZACICTR from "US", "CANADIAN", "DUTCH"... to the codepage names 
supplied in the comments:

TRFIRST  DS    0A
         DC    CL8'AUSGER',A(AUSGER)         Austrian/German CECP 273
         DC    CL8'BELGIAN',A(BELGIAN)       Belgian (New) CECP 500
         DC    CL8'CANADIAN',A(CANADIAN)  Canadian Bilingual CECP 037
...
         DC    CL8'TELNETSE',A(TELNETSE)
         DC    CL8'UK',A(UK)              English (UK) CECP 285
         DC    CL8'US',A(US)              English (US) CECP 037
TREND    EQU   *

This doesn't help identify the codepage, but when you have it, it would allow 
you to pass the codepage number instead of the table name.

It also appears that EZACICTR allows you to pass a complete table instead of 
the table name, if that would somehow be easier:

*  ***************************************************************
*  *   MULTIPLE mode calls
*  ***************************************************************
*       MOVE 'US' to TABLE-NAME.
*       CALL 'EZACIE2A' USING OUT-BUFFER LENGTH TABLE-NAME
*                       RETURNING RET-CODE.
*       CALL 'EZACIA2E' USING OUT-BUFFER LENGTH TABLE-NAME
*                       RETURNING RET-CODE.
*
*  ***************************************************************
*  *   Optional call valid for either mode
*  ***************************************************************
*       CALL 'EZACICTR' USING OUT-BUFFER LENGTH TRANSLATE-TABLE
*                       RETURNING RET-CODE.

hth,

Wendell Lovewell

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to