Converting ASCII to EBCDIC and Packed Decimals as well

Hi All,
We have a requirement where data from a SAP system comes in ASCII format as  a flat file.PI needs to encode 4 fields in the packed decimals and rest of the fields in EBCDIC format before sending to mainframe system.
When I use code page cp500 at the reciever file adapter level it encodes the entire file in EBCDIC format.
However we want those 4 fields to be in packed decimals while sending to mainframe system.
Could you please help me in figuring out a solution?
Thanks,
Sowmya

Hi Sowmya
Check this thread
ASCII to EBCDIC packed decimal

Similar Messages

  • What can I do about paying for Office from a commercial store, and itunes charging $100 for smart converter, ms office package and pack for ms office $41.99? It surely looks like double dipping

    Hi folks, I am puzzled when looking at my itunes account. I bought a store office 365 package for $100, and in the process of installing it, somehow ended up with fees for smart converter, ms office package and pack for ms office, totalling another $90 from itunes. Isn't this double dipping and if so, how do I go about a refund? Thanks jby

    Well, MS Office 2004 is available for the Mac and being a user of both the Windows and Mac versions, I think that the Mac version has a slight edge. The only downside is that it does not come with MS Access so if you use that then you have to stay with the PC version.
    But... if you are set on mainly using Windows then paying a substantial premium just for a computer that looks good rather than on the fact that it runs OSX and hence great packages such as iLife etc is probably a waste. This is especially true when you have to remember that Apple will not give any technical support to users running Windows.. nil, nada, nowt! Likewise, Microshaft (sorry Microsoft) also seem unwilling to give support at this time since (for some strange reason) they don't like the idea of Windows on a Mac.
    As I see it, the main reason for Apple to release the ability to run Windows was to:
    a> Produce an 'official' version rather than have an unauthorised version 'in the field' which if problematic, could give Apple a bad name.
    b> Give people who would like to have a Mac but have the occassional program which has to be run under Windows, the ability to switch to a Mac.
    Option b was the reason why I switched from years on a PC to the Mac.

  • Re: Code convert ascii to EBCDIC

    At 09:06 PM 8/13/97 +0900, Isao Yamada wrote:
    I am trying conversion ascii-to-EBCDIC conversion.You didn't mention the platform, but if it is Unix, I would just pipe the
    input through the dd command. Even if this is a Win32 platform, I would
    consider buying the Win95 toolkit from Ready-to-Run and using the dd
    command in it.
    =========================================================================
    Thomas Mercer Hursh, Ph.D email: [email protected]
    Computing Integrity, Inc. sales: 510-233-9329
    550 Casey Drive - Cypress Point support: 510-233-9327
    Point Richmond, CA 94801-3751 fax: 510-233-6950

    Isao,
    You can convert arbitrary binary data
    using MemoryStream, ReadBinary(), pointers
    and casting to convert simple binary types to the
    type you require. Here is a partial code fragment
    from some binary communications code we wrote
    to give you the idea. Although it looks like
    'C' in places it really is valid TOOL code.
    buf : MemoryStream = new;
    theHeader : MemoryStream = new;
    theData : MemoryStream = new ;
    tempData : BinaryData = new ;
    countBytes : integer = 0 ;
    tempcountBytes : integer = 0 ;
    ConnId : ui2 = 0 ;
    magicNumber : ui4 = 0x5aa50ff0 ;
    p : pointer = nil;
    buf.Open(accessMode = SP_AM_READ_WRITE);
    theHeader.Open(accessMode = SP_AM_READ_WRITE);
    // Read the header
    theHeader.Flush() ;
    theHeader.Seek( position = SP_RP_START ) ;
    countBytes = 0 ;
    // Parse theHeader here
    theHeader.Seek( position = SP_RP_START ) ;
    theHeader.ReadBinary( target = tempData, length = 4 ) ;
    p = (pointer)(tempData.Value) ;
    PacketLength = *(pointer to ui4)(p) ;
    theHeader.ReadBinary( target = tempData, length = 1 ) ;
    p = (pointer)(tempData.Value) ;
    PacketType = *(pointer to ui1)(p) ;
    theHeader.ReadBinary( target = tempData, length = 2 ) ;
    p = (pointer)(tempData.Value) ;
    PacketSeqNo = *(pointer to ui2)(p) ;
    theHeader.ReadBinary( target = tempData, length = 2 ) ;
    p = (pointer)(tempData.Value) ;
    ConnId = *(pointer to ui2)(p) ;
    theHeader.ReadBinary( target = tempData, length = 4 ) ;
    p = (pointer)(tempData.Value) ;
    magicNumber = *(pointer to ui4)(p) ;
    if( magicNumber != 0x5aa50ff0 ) then
    buf.Close() ;
    theHeader.Close() ;
    return FALSE ;
    end if ;
    [email protected]
    MIME-Version: 1.0
    Content-type: text/plain; charset=iso-2022-jp
    Hi! Everyday I read some useful tips from this mailing-list.
    I am trying conversion ascii-to-EBCDIC conversion.
    I want to read binary-file, because EBCDIC code data come by floppy-disk.
    But I can't read this file into TextData object.
    (TextData Class have method to access by byte.)
    I know that I can read binary-data into BinaryData object.
    if I can access BinaryData class by byte or read binarydata into textdata.
    Does anyone have good idea for this question?
    thanks.
    T.C.F.Co.Ltd.
    Isao Yamada([email protected])
    Any views expressed in this message are those of the individual sender,
    except where the sender specifically states them to be the views of
    Reuters Ltd.

  • Re: Code convert ascii to EBCDIC-thanks

    thanks alfred.
    Your hints is enable to make convert-program.
    method CodeConvertB.SJISToEBCDIC(copy input InData: Framework.BinaryData,
    copy output OutData: Framework.BinaryData,
    copy input Length: integer = 0)
    begin
    memIn : MemoryStream = new;
    memOut : MemoryStream = new;
    tmpIn : BinaryData = new;
    tmpOut : BinaryData = new;
    OutData = new;
    j : ui1;
    ic : char;
    oc : char;
    if Length = 0 then
    Length = InData.ActualSize;
    elseif Length > InData.ActualSize then
    Length = InData.ActualSize;
    end if;
    memIn.Open( SP_AM_READ, TRUE );
    memIn.UseData( (pointer to char)(InData.Value), Length );
    memIn.Seek( SP_RP_START );
    memOut.Open( SP_AM_READ_WRITE, TRUE );
    memOut.Seek( SP_RP_START );
    for i in 0 to Length - 1 do
    memIn.ReadBinary( tmpIn, 1 );
    ic = *( pointer to char )( tmpIn.Value );
    j = ic;
    oc = ToEBCDIC[j];-- Value is EBCDIC.Array is S-JIS(ASCII) order
    tmpOut.SetValue( &oc, 1 );
    memOut.WriteBinary( tmpOut, 1 );
    end for;
    memIn.Close();
    memOut.Flush();
    memOut.Seek( SP_RP_START );
    memOut.ReadBinary( OutData, Length );
    memOut.Close();
    return;
    end method;
    if someone want to use this complete-code, mail to me.
    thanks.
    T.C.F.Co.Ltd.
    Isao Yamada([email protected])

    thanks alfred.
    Your hints is enable to make convert-program.
    method CodeConvertB.SJISToEBCDIC(copy input InData: Framework.BinaryData,
    copy output OutData: Framework.BinaryData,
    copy input Length: integer = 0)
    begin
    memIn : MemoryStream = new;
    memOut : MemoryStream = new;
    tmpIn : BinaryData = new;
    tmpOut : BinaryData = new;
    OutData = new;
    j : ui1;
    ic : char;
    oc : char;
    if Length = 0 then
    Length = InData.ActualSize;
    elseif Length > InData.ActualSize then
    Length = InData.ActualSize;
    end if;
    memIn.Open( SP_AM_READ, TRUE );
    memIn.UseData( (pointer to char)(InData.Value), Length );
    memIn.Seek( SP_RP_START );
    memOut.Open( SP_AM_READ_WRITE, TRUE );
    memOut.Seek( SP_RP_START );
    for i in 0 to Length - 1 do
    memIn.ReadBinary( tmpIn, 1 );
    ic = *( pointer to char )( tmpIn.Value );
    j = ic;
    oc = ToEBCDIC[j];-- Value is EBCDIC.Array is S-JIS(ASCII) order
    tmpOut.SetValue( &oc, 1 );
    memOut.WriteBinary( tmpOut, 1 );
    end for;
    memIn.Close();
    memOut.Flush();
    memOut.Seek( SP_RP_START );
    memOut.ReadBinary( OutData, Length );
    memOut.Close();
    return;
    end method;
    if someone want to use this complete-code, mail to me.
    thanks.
    T.C.F.Co.Ltd.
    Isao Yamada([email protected])

  • ASCII to EBCDIC converter

    Hello everybody!
    I'm looking for a function module which converts ASCII text to EBCDIC. Unfortunately I couldn't find anything about this so far. It would be great if somebody could give me some information about.
    Thankyou!
    Best regards,
    Markus

    Hi Marcus,
    You don't need a Function Module; there is a ready ABAP command 'EBCDIC(x)' available.
    You will find more information here: [Converting ASCII to EBCDIC and vice-versa|http://www.sapdb.org/7.4/htmhelp/5e/0a41edba9d11d2a97100a0c9449261/frameset.htm]
    Also, check this link : [Standard include for converting ASCII / EBCDIC|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/converting-data-from-ascii-to-ebcdic-in-unicode-environment-420663]
    Hope this helps! Please let me know if you need anything else!!
    Cheers,
    Shailesh.

  • ASCII to EBCDIC

    Hello All,
    How can I convert ASCII to EBCDIC using PI? Any modules to be used in channel?
    Thanks,
    Regards,
    Naresh

    Hi,
    Please check below thread.. it mentions about the beans you can use.
    Convert EBCDIC to ASCII and ASCII to EBCDIC in PI7.0 SP14
    Regards,
    Deepak

  • Convert EBCDIC to ASCII and ASCII to EBCDIC in PI7.0 SP14

    Wea re going to be implementing PI7.0 SP14.
    I am writing the technical specification for an inbound/outbound interface into/out of ECC 6.0!
    I need to convert the File that is created out of SAP into EBCDIC in PI and for the inbound convert the file from EBCDIC into ASCII for import into ECC.
    I have more than one way to this...
    The ways I have found so far are:
    Use MessageTransformBean, use TextCodepageConversionBean, XmlAnonymizerBean, using the File Encoding field on the File/FTP Adapter, XSLT mapping or Java mapping!
    I have checked the OSS Note 821267, but this doesn't help.
    I am sure all these methods have pros and cons...
    What would be the most efficient method of changing this?  It will be running hourly and have upto 6000 entries an hour - each way!

    Hi Barry,
    I think the most efficient way in my thinking is XSLT and Java mapping.
    For java mapping u just need to get thye jar file.I believe that the encoding cp285 / cp500 is EBCIDIC. Try printing
    byte [] msg = .. // whatever
    System.out.println(new String(msg, "cp285"));
    if you get an exception saying Cp285 is unknown you may need an international version of the JRE, depends on the version you're using.
    Also u can use this in reverse.
    Please see this post:
    Re: Handling Packed decimals in XI
    regards
    Aashish Sinha
    Edited by: Aashish Sinha on Mar 25, 2008 6:07 PM

  • Converting ASCII to Binary

    Hello I need some help.
    I need to convert the ASCII data to Binary form. Like if i have the character 'A' and its ASCII is 65 then its binary would be 01000001.
    If there is any function/method available in java to convert ascii to binary, i would be really thanful.

    Hello I need some help.
    I need to convert the ASCII data to Binary form. Like
    if i have the character 'A' and its ASCII is 65 then
    its binary would be 01000001.
    If there is any function/method available in java to
    convert ascii to binary, i would be really thanful.
    byte ascii = 65;
    String binresult = "";
    for(int i=0;i<8;i++) {
      if(ascii%(2^i)=0) binresult += "0";
      else binresult += "1";
    }

  • Convert ASCII File into HTML

    Hi All,
    I have a requirement to convert ASCII files (formatted files when opened through Textpad / Editplus) into HTML when its hyperlink is clicked from my application.
    The present code is that, the TXT file was streamed, html tags have been added and the entire file was re-written as HTML (based on char 12 / 32, as the case may be) and saved as JSP / HTML extension, and placed in a temp folder.
    response.sendRedirect() was used to open this file, which threw OutofMemoryException errors.
    It was also revealed that, if the original ASCII file was 40KB, the converted JSP file would be 160KB (around 4 times)
    The ideal conversion should be - add html tags in the new file and maintain the same formatting as the original ASCII file, & save the file with new extension.
    Thus I need a memory efficient method such that these files are converted on the fly by the application, yet the size kept minimum.
    Please suggest. Thanks in advance
    Regards
    Hari N

    160k is trival on a modern desktop OS. Especially since it is temporary. What heap size is the server using?

  • HELP! Converting ascii to its decimal codes

    Does anyone know how to convert ascii code to its decimal equivalent? Is there a simple function that can do this?
    Thanks for any help!!

    Yes there is.
    String whatever = "whatever"
    char[] chars = whatever.toCharArray();
    for(int i=0; i<chars.length; i++) {
    System.out.println( (int) chars[i] );
    And since its friday I wont flame you for not reading
    a simple tutorial, though its hard not to
    ehmm, the square brackets around the chars[i] are replaced by
    non-squares, or not visible, but they ARE square brackets

  • How to convert ASCII to an integer number??

    Here I am trying to send the number 1000000 from microcontroller through UART and I am recieving the ASCII in labview. But i would like to get exact 1000000 in labview too. So i am trying to convert ASCII to integer but i am unable to do that.
    Solved!
    Go to Solution.

    danil33 wrote:
    Hello mallik,
                       Please don't feel bad.Smercurio and all other experts are trying to make us to do things by our own.THis will make us experts in labview.Thats why he told you to go through the tutorials.I have heard such type of advice(sometimes they scold us) so many times.Still Iam hearingIt is our fault that we won't go through the tutorials properly.Don't get annoyed.
    Besides, the question is quite unclear formulated and makes me almost assume, that the OP hasn't even bothered to look for a solution himself. Since the OP receives a string it would be logical to look in the String palette for some function to do what he wants. And inside that palette there is magically a String/Number Conversion palette, which sounds almost like it could contain at least one function that could do the right thing. (In fact it contains 3 that could work, but I'm sure the OP can find the most logical one for his number easlily).
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to convert ASCII to CHAR?

    Hi, experts.
    Now I want to convert ASCII to CHAR, can you give me some methods? And I also want to know what's my ABAP Version.
    Thanks in advance!

    *After look so bad code that no work i did my own code, a gift for all you:*
    FORM CHARACTER_ASCII   using    p_letra
                                                 changing p_nro   type i.
    field-symbols: <n> type x.
    assign p_letra to <n> casting.
    move <n> to p_nro.
    ENDFORM.
    FORM ASCII_CHARACTER using    p_nro type i
                                               changing p_letra.
    DATA: c    TYPE c,
          x(4) TYPE x.
    FIELD-SYMBOLS: <fc>  TYPE c.
    x = p_nro.
    ASSIGN x to <fc> CASTING TYPE c.
    MOVE <fc>+1(1) to p_letra.
    ENDFORM.

  • Serial Number in Pick and Pack

    Is there a way to enter the Serial Number during the Pick and Pack process? Can you have the Serial Number in placed before the Delivery is done?
    Please advise. Thank you.

    Thanks, Nagesh. That confirmed my suspicion.
    This is the business scenario.
    The operations and the warehouse are in different locations. For items with serial numbers, the operations call up the store to get the serial number before they can issue the Delivery Order. The turn around time can be long.
    If the warehouse people can enter the Serial Number during Picking, then the Operations can just convert them into Delivery Order.
    Alas, this cannot be done in SBO.

  • Convert ascii to hexadecimal

    They forgive my weak knowledge of labview. It needed that they helped me, to convert AsciiI into hexadecimal. I give the following example:    I have a string #01SVT<BL>+098,037 (ASCII) = 2C9 (hexadecimal). how it is that I can get this for labview?    Debtor, and I ask for excuse for my English.

    Hi Luigi,
    why is 2C9 (hexadecimal) = #01SVT<BL>+098,037 (ASCII)?? But anyway, if you want to split your String to extract some parts of the String, there is a function called "split string"
    . And from that splitted part you can make a conversion to a hexadecimal string by converting it into an integer and converting back to a hexa- string. All that functions you can find in the "string"-palette.
    Another hint (and one of the reasons i'm so inspired by LabView) is: If you want to test the behaviour of a function or VI, simply open a new blank VI, drop the function to examine and create appropriate controls and indicators of the interesting In- and Outputs by the context menu of the connectors. Then you can type in some testdata and run the VI to see, what the function does. This is a very fast way to create a testing environment for the function.
    Hope this helps,
    Dave
    Greets, Dave

  • To Convert ASCII Data to PDF file

    Hello,
    Does any one knows how to convert ASCII data into PDF document using Java. I know there are some 3 party tools available which does this, but i don't want to use any 3 party tools.
    Can help on this matter, doing it using java programming will be appreciated

    if you don't want to use 3rd party tools, then you will need to go read either the source of an app that does it, and port/copy it.
    Or go read the the specs.

Maybe you are looking for