+ Reply to Thread
Results 1 to 3 of 3

Thread: EBCDIC to ASCII conversion on AS/400

  1. #1
    Guest.Visitor Guest

    Default EBCDIC to ASCII conversion on AS/400

    Hi all, I want to convert the available ASCII data to EBCDIC format and a vis-a-versa. Are there any inbuild API's in AS/400 to do the function for me, If yes then then where can i get the detailed info of these API's? I would like to see some examples on these API's where can I get them? Pls help me! Thanks and Regards Suresh

  2. #2
    Guest.Visitor Guest

    Default EBCDIC to ASCII conversion on AS/400

    Would suggest an API named QDCXLATE. A complete description may be found in the OS/400 National Language Support API manual. It works well

  3. #3
    Guest.Visitor Guest

    Default EBCDIC to ASCII conversion on AS/400

    The following is a procedure that I created for writing and reading data in the IFS, using the QDCXLATE API. This procedure uses the TCP/IP translation tables in library QUSRSYS. There are other translation tables available, but these work for my application.
     *--------------------------------------------------------------------- * @StringXlate -Translate String- EBCDIC to ASCII and ASCII to EBCDIC *--------------------------------------------------------------------- P @StringXlate B D @StringXlate PI 32702 D p_XlateOutput 1 const D p_StringToXlt 32702 const * Definitions for Locally Defined/Used Work Fields D w_XlateString S 32702 D w_StringLngth S 5P 0 D w_CnvTable S 10 D w_CnvTblLib S 10 D c_AsciiToEbcdc C const('A') D c_EbcdicToAsci C const('E') C eval w_XlateString = p_StringtoXlt C eval w_CnvTblLib = 'QUSRSYS ' C eval w_StringLngth = 32702 C select C When p_XlateOutPut = c_EbcdicToAsci C eval w_CnvTable = 'QTCPASC ' C When p_XlateOutPut = c_AsciiToEbcdc C eval w_CnvTable = 'QTCPEBC ' C endSl C call 'QDCXLATE' C parm w_StringLngth C parm w_XlateString C parm w_CnvTable C parm w_CnvTblLib C return w_XlateString P E 
    Hope this helps.

+ Reply to Thread

Similar Threads

  1. ILE quickie way to convert ASCII to EBCDIC?
    By Guest.Visitor in forum Programming
    Replies: 12
    Last Post: 06-01-2001, 05:46 PM
  2. ASCII to EBCDIC conversion and vice versa
    By Guest.Visitor in forum Programming
    Replies: 2
    Last Post: 05-22-2000, 09:53 AM
  3. ASCII to EBCDIC
    By Guest.Visitor in forum Programming
    Replies: 2
    Last Post: 03-28-2000, 08:52 AM
  4. ASCII to EBCDIC
    By Guest.Visitor in forum Analysis
    Replies: 2
    Last Post: 05-13-1998, 09:06 AM
  5. EBCDIC TO ASCII CONVERSION TABLE
    By David Abramowitz in forum Programming
    Replies: 0
    Last Post: 01-01-1995, 02:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts