Thread: Transforming ECBDIC to ASCCI code

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    2

    Question Transforming ECBDIC to ASCCI code

    Hi everyone
    I am currently developing a process that should handle data from an AS400
    system. However, as the AS400 adapter is not available yet, I am getting
    data from AS400 via ftp (binary) and trying to process locally via a
    C++ program. However I need to transform EBCDIC code which my program reads
    to transform it to ASCCI code so I did not found any other way to perform such a
    transform. I wonder if there is a class or an option of a component
    that allows EBCDIC to ASCII transformation. In case I should write some
    code to build a component that perform such a conversion, I wonder if
    someone could help me with some code sample.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    You need to learn how to use Google:
    http://www.cs.umu.se/~isak/Snippets/a2e.c
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by logangha View Post
    Hi everyone
    I am currently developing a process that should handle data from an AS400
    system. However, as the AS400 adapter is not available yet, I am getting
    data from AS400 via ftp (binary) and trying to process locally via a
    C++ program. However I need to transform EBCDIC code which my program reads
    to transform it to ASCCI code so I did not found any other way to perform such a
    transform. I wonder if there is a class or an option of a component
    that allows EBCDIC to ASCII transformation. In case I should write some
    code to build a component that perform such a conversion, I wonder if
    someone could help me with some code sample.
    Which of the six or so (incompatible) versions of EBCDIC do you need? Once you've chosen a codepage, the technique is to create a 256-entry lookup table which, when indexed by EBCDIC code, yields the corresponding ASCII code.

    I don't remember whether EBCDIC <-> ASCII is a 1-to-1 mapping or not. There may be holes or ambiguities.

    EDIT: bithub's response is a good place to start, but again, I have no idea which variant of EBCDIC is used for those tables and it may not be the one you need.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Registered User
    Join Date
    Aug 2009
    Posts
    2

    Talking Thanks for your attention

    ok fellas

    I ask apologies for interrupting your busy activities to see something trivial like this. I appreciate your valuable help and sorry for my poor English. With I was told it's enough to go on.

    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  2. transforming code to one main function..
    By transgalactic2 in forum C Programming
    Replies: 13
    Last Post: 12-08-2008, 01:22 PM
  3. Obfuscated Code Contest: The Results
    By Stack Overflow in forum Contests Board
    Replies: 29
    Last Post: 02-18-2005, 05:39 PM
  4. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM