Binary to Ascii conversion

Dear experts,
For BINARY to ASCII conversion, please give me some example programs (using methods).
Thanks a lot in advance.
Regards,
Matt

Hi,
I think this link will be useful for you. Please go throught this link....
http://help.sap.com/saphelp_erp2004/helpdata/en/d6/0dba8f494511d182b70000e829fbfe/frameset.htm
Hope it will helps

Similar Messages

  • String (binary) to boolean conversion problem.

    Hello,
    Im facing problems converting a string (presumably in the binary format) to turn on LEDs according to its respective weight. ie.binary input = 1010. Thereby it would turn on the first (MSB) and third LEDs while the second and third are left off.
    What I have managed to obtain is a direct conversion of decimal to binary but have not much idea on how to achieve the above goal. The attached file shows two operations; top part does the boolean to binary conversion is fine. The bottom is supposed to be the binary to boolean conversion.
    Attachments:
    boolean to string.vi ‏21 KB

    OK, let's back up a second here. I don't understand what your "boolean to string" VI is doing. Are you starting with a string, a number, or a bunch of Boolean controls? The top part is dealing with Boolean controls and creating a string of characters of "0" and "1". The bottom part you have a numeric control. By the way, it is pointless to take the output of Number to Boolean Array, converting it to an array of 0s and 1s, indexing out each element, and then using the Not Equal to Zero operator. Just take the Boolean array output from Number to Boolean Array directly into an Index Array!
    You seem to be saying that you have a string in the binary format. This is somewhat meaningless, so I'm assuming you mean you have a string that consists of a sequence of the ASCII characters "1" and "0" to indicate a numerical 1 or 0. You then want to convert this into something that is programmatically useful. What that is is not clear, so let's assume an array of Booleans. If that's the case, then you can simply take advantage of the fact that you're starting out with ASCII characters, and use the ASCII codes to find out what you have. The ASCII code for the character "0" is 30 (hex) or 48 (decimal). The ASCII code for the character "1" is 31 (hex) or 49 (decimal). Assuming this is what you have and what you want, then you can simply do this:
    Attachments:
    Example_VI.png ‏8 KB

  • Binary to Voltage Conversion of encoder data on cRio 9073 using FPGA

    I am using FPGA with a cRio 9073 to acquire torque and absolute quadrature encoder values. It says in the FPGA instructions that the documentation for the 9073 should include the binary to voltage conversion, but when I looked at the documentation, it wasn't there. Where can I find the conversion value or function to convert binary encoder data back to voltage? The encoder is hooked up to an analog converter and is acquired with a 9215 AI (+-10V differential). Thanks

    There are individual formulas for one or a group of modules.
    LabView examples path:
    LabVIEW 2010\examples\CompactRIO\Basic IO\Analog Raw Host Calibration\AI Raw Host Calibration
    LabView help topic 
    Converting and Calibrating CompactRIO Analog Input Values (FPGA
    Interface)
    Best regards
    Christian

  • Binary or ASCII

    Guys, how can I check if a file I am about to read is binary or ASCII text?
    Edited by: JRAEL on Jan 10, 2010 5:09 AM

    JRAEL wrote:
    Guys, how can I check if a file I am about to read is binary or ASCII text?Use the GNU file command
    GNU> file file_I_am_about_to_read

  • Detect file type of binary or ascii

    Is there a clean way to detect for a file its type, either binary or ascii. More specifically, given an arbitrary file, I want to check it to see if it is an ascii file or a binary file. If the file is binary, I want to check it again to see what possible binary type it is: gzip, excel doc, pdf doc, etc.
    What tips can you provide.
    Thanks.

    You could perhaps use a similar convention to perl:
    http://www.perldoc.com/perl5.6/pod/func/X.html
    The -T and -B switches work as follows. The first block or so of the file is examined for odd characters such as strange control codes or characters with the high bit set. If too many strange characters (>30%) are found, it's a -B file, otherwise it's a -T file. Also, any file containing null in the first block is considered a binary file. If -T or -B is used on a filehandle, the current stdio buffer is examined rather than the first block. Both -T and -B return true on a null file, or a file at EOF when testing a filehandle. Because you have to read a file to do the -T test, on most occasions you want to use a -f against the file first, as in next unless -f $file && -T $file.

  • EBCDIC to ASCII conversion

    Hello experts,
    i'm performing EBCDIC to ASCII  conversion in our system and the export (command R3SETUP dbextr.r3s) terminates with the error :
    EXP) TABLE: "MCDYNTYPEN"
    (EXP) TABLE: "MCDYNUM"
    DbSl Trace: Error -904 in function exec_cached_fetch
    (EXP) ERROR: DbSlExeRead: rc = 99, table "MCHA"
         (SQL error -904)
    error message returned by DbSl:
    DbSl Trace: SQL error -904 with reason code 13
    Resource limit exceeded. Job=323987/DEVCPC/R3LOAD
    #STOP: 20100416175601
    Thank you,

    Once more the installation stopped with error...
    ERROR 2010-07-07 17:33:50 DBR3LOADEXEC_IND_DB4ASCII R3loadPrepare:0
    Child exited with error: rc = 2                                
    child_pid = 3                                                  
    See logfile SAPAPPL0.log for further information
    ERROR 2010-07-07 17:34:33 DBR3LOADEXEC_IND_DB4ASCII R3loadPrepare:0 
    Child exited with error: rc = 2                                 
    child_pid = 3                                                   
    See logfile SAPAPPL1_10.log for further information
    .ERROR 2010-07-07 17:36:01 DBR3LOADEXEC_IND_DB4ASCII R3loadPrepare:0
    Processes started: 46                                          
    Ended with error:  2                                           
    load tool ended with error.                                    
    See above SAP*.log errors.
    Error: Can not unlock the LogWriter. 
    Possible reasons:                                                                   
    No permissions to set the lock             
    Error: Can not lock the LogWriter.                                  
    Possible reasons:                                                   
    No permissions to set the lock                                      
    Error: Can not unlock the LogWriter.                                
    ERROR 2010-07-07 17:36:04 DBR3LOADEXEC_IND_DB4ASCII InstallationDo:0
    Phase failed.
    The message in "SAPAPPL0.log" is that
    "(IMP) ERROR: SQL statement failed: DROP TABLE "MCHA"
    MCHA in *LIBL not table, view, or physical file.
    " and in "SAPAPPL1_10.log" is
    "#Trying to create primary key "S602+0"
    (IMP) ERROR: CREATE statement failed for object "S602"
         (ALTER TABLE R3DEVDATA/"S602" ADD CONSTRAINT "S602+0" PRIMARY KEY ( "MANDT", "SSOUR", "VRSIO", "SPMON", "SPTAG", "SPWOC", "SPBUP", "VKORG", "VTWEG", "ZZIDIWTIS", "PRODH", "MATNR", "WERKS"  ))
    DbSlExecute: rc = 99
    (SQL error -603)
    error message returned by DbSl:
    Unique index cannot be created because of duplicate keys. "

  • Reg EBCDI to ASCII  conversion

    Hi,
          our project is converting from EBCDIC to ASCII conversion,
    we need to some changes for the programs, shown in T-CODE SLIN, if any one have any document , please help me in this regard how to correct the changes required.
    Regards.
    venkat

    hi
    data:pack type p deimals 2.
    first pass char value to pack and then from pack pass it to floting point variable.
    Regards
    Neha

  • Time comparision of ASCII conversion VS Unicode conversion

    In general how does the runtime of a Unicode conversion compare to that of the ASCII conversion?  For example, you perform the Unicode conversion on the same hardware on which you completed the ASCII conversion.  The ASCII conversion takes 20 hours.  Does the Unicode conversion take a similiar time?
    thanx
    Mark

    Hi Mark,
    first an answer, that comes only now, because my user was somehow locked or whatever ...
    How long does it take compared to the ASCII CPC ?
    As you are a latin-1 customer I guess, you could make use of the InPlace version in both attempts.
    The InPlace Unicode CPC Export will take 6-7h or the time of the Ascii Export if this was longer. The reload will take about 3h only.
    The major problem is on some other edge:
    The combined upgrade only works fine if you run all the scans and this will take several days ... even when they are "pretty useless" in your case. Therefore, I would recommend an ECC6 upgrade without unicode and then the unicode conversion directly afterwards - in a short special technique, that I used several times already.
    If it is "just" from 4.6C ASCII to ECC 6.0 Unicode, the week will be fully sufficient including all backups - which can sometimes run in parallel. (at least with my ideas)
    I did something like that from 4.6B ASCII to ecc5 Unicode on one weekend from friday evening until sunday afternoon. (for sure, depending on the systemsize)
    Regards
    Volker Gueldenpfennig, consolut.gmbh
    http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

  • Downtime for EBCDIC to ASCII conversion

    Hello,
    we have performed successfully an EBCDIC to ASCII conversion for a client's development system.
    The total downtime was about 24 hours.
    The customer though, refuses to have downtime of their production system, since it severely affects their systems.
    Is there a possibility not to have any downtime for an EBCDIC to ASCII conversion ?
    We were thinking as alternatives to build a second productive system, do the conversion there and after finishing, to apply journal receivers from the real production system. This would minimize their downtime to the backup time of the production system and the time needed to apply the journal receivers ?!?
    Has anyone performed such a task ?
    Would this be feasible (we would have to apply journals from an EBCDIC system to an ASCII system)
    Thank you very much
    Katerina Psalida

    Hi Katerina,
    applying journal changes from the EBCDIC system to the ASCII system will not work for several reasons, primarily because the journal keeps track of the journaled tables through an internal journal ID, which will not be the same after the EBCDIC to ASCII conversion. Technically it would not work because the data in the journal entries is kept very low-level, so a conversion from EBCDIC to ASCII during apply is not implemented. Also, the journal entries are based on the relative record numbers in the table, and after the conversion, the relative record numbers will not necessarily be the same.
    I am not aware of a zero-downtime conversion option. You can speed up the conversion if you use the "Inplace" conversion option. Did you use that when you measured the 24 hours downtime at the test system? If not, you should give the Inplace option a try. Depending on your data, it could reduce the downtime significantly.
    Kind regards,
    Christian Bartels.

  • EBCDIC - ASCII Conversion for XI File Adapters

    All:
    Does XI File Adpater have built-in capability to convert EBCDIC to ASCII and vice versa?  We also need to handle pack decimals.  All mainframe file based integration scenarios require this capability.
    If there's no built-in capability available, are there any Java APIs available from SAP XI bundle some where.
    Thanks and appreciate your feedback.

    Hi,
    Unfortunately, there is no built-in EBCDEC-ASCII conversion in XI.  There are examples when you do a search on GOOGLE.
    The java function can be used in either java mapping or adapter user-module.
    Regards,
    Bill

  • String to Packed ASCII conversion

    Hi,
    Can anyone provide any examples or Algorithm to convert 'ASCII' to 'Packed ASCII'
    Packed ASCII format is used in HART protocol
    Thanks.

    Hi,
    Packed ASCII is noting but a data compression technique.
    HART makes limited use of data compression in the form of Packed ASCII.  Normally, there are 256 possible ASCII characters, so that a full byte is needed to represent a character.  Packed ASCII is a subset of full ASCII and uses only 64 of the 256 possible characters.  These 64 characters are the capitalized alphabet, numbers 0 through 9, and a few punctuation marks.  Many HART parameters need only this limited ASCII set, which means that data can be compressed to 3/4 of normal.  This improves transmission speed, especially if the textual parameter being communicated is a large one.
        Since only full bytes can be transmitted, the 3/4 compression is fully realized only when the number of uncompressed bytes is a multiple of 4.  Any fractional part requires a whole byte.  Thus, if U is the number of uncompressed bytes, and T the number of transmitted bytes; find T = (3*U)/4 and increase any fractional part to 1.  As examples, U = 3, 7, 8, and 9 result in T = 3, 6, 6, and 7.
        The rule for converting from ASCII to Packed ASCII is just to remove bits 6 and 7 (two most significant).  An example is the character "M".  The full binary code to represent this is 0100,1101.  The packed binary code is 00,1101.  The rules for conversion from packed ASCII back to ASCII are (1) set bit 7 = 0 and (2) set bit 6 = complement of packed ASCII bit 5.
        Note that, with some exceptions, HART Slaves don't need to do the compression or know anything about the compression.  They simply store and re-transmit the already compressed data.  Again, this is an instance where the more difficult software is placed in the device (Master) that is more capable of dealing with it.
    Thanks and Regards
    Himanshu Goyal
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!

  • Binary to XMl Conversion

    Hi All,
    I am trying to convert data from internal table to Binary and then taking the same in the XML format for Display.
    Steps 1 : from internal table to Binary conversion.
    create & set encoding
    lo_encoding = lo_ixml->create_encoding(
                       byte_order    = if_ixml_encoding=>co_none
                       character_set = 'UTF-8' ).
       CALL METHOD lo_xml_doc->m_document->set_encoding(
                     encoding = lo_encoding ).
    create output stream...
       lo_stream_fact = lo_ixml->create_stream_factory( ).
       lo_ostream = lo_stream_fact->create_ostream_xstring(
                      string = e_xml ).
    data : i_size like SY-TABIX .
    CALL METHOD lo_xml_doc->RENDER_2_XSTRING(
    IMPORTING
    stream = e_xml
    RETCODE = gd_rc
    SIZE = i_size ).
       x_test-e_xml = e_xml.   
    Step 2 : We are moving the same to application server using Legacy Binary mode 
    Step 3 : Again by some another report we are reading the file.
      OPEN DATASET XYZ FOR INPUT IN LEGACY BINARY MODE.  
    Step 4 : And finally converting the binary data in XML for display.
    CLASS cl_ixml DEFINITION LOAD.
    lp_ixml           = cl_ixml=>create( ).
      lp_xml_document   = lp_ixml->create_document( ).
      lp_stream_factory = lp_ixml->create_stream_factory( ).
    create input stream from lt_data...
    lp_istream = lp_stream_factory->create_istream_xstring(
                                        string = l_xdata ).
    define parser...
    lp_parser  = lp_ixml->create_parser(
                             document       = lp_xml_document
                             istream        = lp_istream
                             stream_factory = lp_stream_factory ).
    parse input stream --> fills lp_xml_document...
      ld_rc = lp_parser->parse( ).
      IF ld_rc <> 0.
        MESSAGE e000(ydb0060) WITH 'lp_parser->parse( )'.
        EXIT.
      ENDIF.
      CALL METHOD lo_xml_doc->create_with_dom( document = lp_xml_document ).
      CALL METHOD lo_xml_doc->display( ).
    My Problem is,
    Say I got 2 field in internal table Desc and Value.
    IT-DESC = 'Test' .
    IT-VALUE = '' .
    here the system should show me
    <item>
      <DESC>Test</DESCR>
      <VALUE />
      </item>
    but it is showing as
    <item>
      <DESC>Test</DESCR>
      </item>
    If the value field is blank then <VALUE /> is not getting displayed in XML
    Please guide,
    Thanks & Regards,
    Swapnil

    I've run into the same issue, and in response to why I would want to revert back to CLOB storage; it's because there seems to be a 32k limit on the content in the XMLType column when using binary storage.
    Previously in 11.2.0.1 we have no issues with this length of xml data stored in clob format but since moving one db to 11.2.0.2 the database completely dies when trying to read that column with >32k data length.
    DB dies with either:
    ORA-00600: internal error code, arguments: [kpolcsc1], [0], [], [], [], [], [], [], [], [], [], []
    or
    ORA-00600: internal error code, arguments: [kpolcbLobRead1: invalid len & bufp], [], [], [], [], [], [], [], [], [], [], []
    And I don't find any articles on MOS either searching the knowledge base or using the ora-600 lookup tool that aren't already fixed: kpolcsc1 was fixed in 11.1.0.6 according to ora-600 lookup tool.
    I would prefer to keep binary storage, and not have to revert to clob, but if I can't found a solution to 32k limit then im going to have to revert storage type.

  • Transfering files in binary or ASCII mode

    I am uploading a shopping cart and some files need to be transferred in ASCII mode and some in binary mode. Can I change this setting anywhere, or doesn DW automatically do this based on file extension, or ???? I can't seem to find much information about this in the forums or on the internet anywhere either.
    I'm using CS4 for windows.
    Thanks!

    Hi
    They are talking rubbish in the example given.
    Basically any html/css/javascript/php/sql-statement and many others are written in ascii, whereas a video/image/audio/exe file are in binary, (as series of 0 or 1 bit) when created, as I said all files are in the end in binary but the software that is used by you, or your server is what translates them to or back-to the required format for us mere mortals.
    Transfer the files as normal, (via ftp) but I would advise checking on any support that you may require in using the software, (your shopping cart) because the distinction being made by the cart suppliers, could point to a lack of understanding by them. Many years ago, (in the days of 'blue screen' bulletin boards, (pre web) the distinction was made because of the required 'headers' that must be sent with the file transfer, but this is not required with such files any more as it is handled by the software.
    Your doctype and associated info is an example of a 'header'.
    PZ

  • Binary to ascii

    Hi, I have a binary file and I want to read and write to another file in ASCII (plain text). An example with a code snippet is appreciated.

    Sorry if I'm confusing and I know that all files are
    stored as binary behind the scnes.
    But I have a file in binary format. I open it with a
    text editor and you do not see plain text. Now I want
    to convert this into plain text file and save it to
    file system. So now when I open this converted file
    with a text editor I should be able to read it.I'm sorry but this is just rubbish. I can provide you with dozens of binary file formats that cannot be interpreted as text. I will bet others in this forum will be be able to provide hundreds more.
    You have to indicate how a binary file can be converted to text, even if it is only to say it needs to be Base64 or Hex encoded.

  • Read binary and ascii values from input stream

    Hi All
    I want to read a stream that consist both binary values and ascii values. Length of the stream cannot anticipate. Can you help me?
    Thanks

    Sameera wrote:
    Hi All
    I want to read a stream that consist both binary values and ascii values. Length of the stream cannot anticipate. Can you help me?
    ThanksHave a look at this:
    Character and Byte Streams
    http://java.sun.com/docs/books/tutorial/i18n/text/stream.html

Maybe you are looking for

  • Exclamation Mark instead of Pictures

    Until last week I was using 10.4.11 and iPhoto 7.1.1 without any problems of any kind. I then had a larker hard disk built into my MBP. The Service Technician installed 10.5.1 onto the new disk by accident and sinced then i keep getting exclamation m

  • ORA-01422 exact fetch returns more than requested number of rows on invoice

    Hello developer, Current I m facing problem ORA-01422 exact fetch returns more than requested number of rows in Invoce Standard form when we select PO_Default invoice type for some specific PO Number not for all. I m not able to handle the error bcoz

  • Navigation to coordinates with Ovi Maps v.3.04 on ...

    Is there some possibility to navigate towards coordinates instead of an address (street, town and s.o.)? Cell software version 50.0.005.502.02 Ovi Maps version 3.04 Could someone help me? Thanks & regards. Solved! Go to Solution.

  • Mandatory "Allocation" field in MRHR (SAP 4.0B)

    Hi Guys ! I'm writting an application to post MM invoices using BDC for MRHR transaction. SAP Version 4.0B. My problem is that for some PO items, field "Allocation" is required and for others NOT and I need to inform user (in my application) if "Allo

  • Installing an additional package

    I'm probably going to sound incredibly stupid here, but I don't know how to install a new package. I'm trying to get the jakarta POI package working with my JDK, but I'm not sure how. I downloaded the zip file and unzipped it, but I'm not sure what t